Rust 1.96.0 ships on May 28, 2026, with a focused set of backend improvements and bug fixes. This maintenance release stabilizes several APIs, including the long-requested assert_matches! macro, and resolves two CVEs in Cargo. The rust 1.96.0 release notes reveal no flashy user-facing features, but the compiler and library teams made targeted refinements that reduce friction for embedded and cross-platform developers.
This maintenance release is recommended for all Rust users, especially those targeting LoongArch Linux, Fuchsia, or SGX environments. The upgrade addresses two security vulnerabilities in Cargo and introduces a handful of stabilized APIs that simplify pattern matching and lazy initialization patterns.
What Changed
- Language: Allow passing expr metavariable to
cfg. - Language: Always coerce never types in tuple expressions.
- Language: Avoid incorrect inference guidance of function arguments in rare cases.
- Language: Support s390x vector registers in inline assembly.
- Language: Allow using constants of type
ManuallyDropas patterns (fixing a regression from 1.94.0). - Compiler: Enable link relaxation for LoongArch Linux targets.
- Compiler: Update riscv64gc-unknown-fuchsia baseline to RVA22 + vector.
- Libraries: Support iterating over ranges of
NonZerointegers. - Libraries: Refactor valid for read/write definition to exclude null.
- Libraries: Fix SGX delayed host lookup via
ToSocketAddr. - Stabilized APIs:
assert_matches!,debug_assert_matches!,From<T> for AssertUnwindSafe<T>,From<T> for LazyCell<T, F>,From<T> for LazyLock<T, F>, and six range structs. - Cargo: Allow a dependency to specify both a git repository and an alternate registry.
- Cargo: Added target.’cfg(..)’.rustdocflags support.
- Cargo: Fixed CVE-2026-5222 and CVE-2026-5223.
- Rustdoc: Deprecation notes now render like any other documentation.
- Rustdoc: Separate methods and associated functions in sidebar.
- Compatibility: Fix layout of
#[repr(Int)]enums with fields of uninhabited ZSTs. - Compatibility: Remove
-Csoft-floatflag. - Compatibility: Update minimum external LLVM to 21.
- Compatibility: Change
c_doubletof32on AVR targets.
Why It Matters
- Maintenance release: no specific features or changes documented in release notes, but the stabilization of
assert_matches!anddebug_assert_matches!gives teams a first-party way to write match-like assertions without external crates. - The SGX fix closes a latent networking bug for enclave applications, critical for developers targeting Intel SGX environments.
- LLVM 21 requirement and AVR c_double change are breaking changes that directly impact teams on older toolchains or embedded AVR projects.
Who Should Upgrade
This release is particularly relevant for API developers building integrations, teams maintaining embedded systems, and security-conscious developers who need the latest Cargo CVEs patched. If you rely on assert_matches! or need the improved SGX networking, upgrade immediately. Developers on AVR or with custom LLVM setups should review the breaking changes before upgrading.
How to Upgrade
- Update your Rust toolchain:
rustup update stable. - Verify the installed version:
rustc --versionshould print1.96.0. - Update Cargo dependencies:
cargo updateto pick up any new registry versions. - Check for breaking changes by running
cargo checkon your project.
Usage Examples
- Use
assert_matches!(value, Pattern)to panic if a value does not match a given pattern. Ideal for tests where you want a clear failure message. - Iterate over
NonZerointeger ranges using the new standard library support. This eliminates manual bounds checking in numeric loops. - Configure Cargo to use a git source for local development while publishing to an alternate registry. No more manual overrides.
Breaking Changes
- AVR c_double changed to f32: On AVR targets,
c_doublenow matches C’s 32-bit double. This breaks code that assumed a 64-bit double. - Minimum LLVM raised to 21: If you use a custom LLVM older than version 21, the compiler will refuse to build.
- Importing structs with
::{self as name}: This pattern is no longer permitted. Use the standard module import syntax instead. - Remove
-Csoft-float: The flag was deleted. Use target features to control soft-float behavior.
Known Issues
- No known issues reported in official notes.
Feature Flow
Official Release Notes
π οΈ Try These Free Tools
Paste your dependency file to check for end-of-life packages.
Plan your upgrade path with breaking change warnings and step-by-step guidance.
Compare EKS, GKE, and AKS monthly costs side by side.
Track These Releases