The rust 1.96.0 release notes landed today with a quieter update. No flashy new features headline the release. Instead, this maintenance version focuses on backend tweaks and essential bug fixes. The Rust team shipped 11 stabilized APIs, including assert_matches!, and patched two security vulnerabilities in Cargo. For developers running existing Rust projects, this release offers a stable point to upgrade without breaking changes to daily workflows.
This maintenance release is recommended for all Rust users. The team fixed layout edge cases for enums, patched Cargo CVEs CVE-2026-5222 and CVE-2026-5223, and stabilized 11 APIs like assert_matches!. Upgrading ensures you get these fixes without disrupting existing code.
What Changed
- Language: Allow passing expr metavariable to cfg, coerce never types in tuple expressions, avoid incorrect inference guidance of function arguments, support s390x vector registers in inline assembly.
- Compiler: Enable link relaxation for LoongArch Linux targets, update riscv64gc-unknown-fuchsia baseline to RVA22 + vector.
- Libraries: Support iterating over ranges of NonZero integers, refactor valid-for-read/write definition, fix SGX delayed host lookup via ToSocketAddr.
- Stabilized APIs:
assert_matches!,debug_assert_matches!,From<T>forAssertUnwindSafe,LazyCell,LazyLock, plus core::range types. - Cargo: Allow dependencies to specify both a git repository and an alternate registry, add target.'cfg(..)'.rustdocflags support, fix CVE-2026-5222 and CVE-2026-5223.
- Rustdoc: Render deprecation notes like other docs, don't emit missing-doc-code-examples lint on impl items, separate methods and associated functions in sidebar.
Why It Matters
- Maintenance release: no specific features or changes documented in release notes.
- The Cargo security fixes protect against two CVEs, making this a must-upgrade for projects using the package manager.
Who Should Upgrade
This release is relevant for all Rust developers. If you maintain a project using Cargo, upgrade immediately to patch the security vulnerabilities. Teams using #[repr(Int)] enums or BTreeMap::append() should test for edge cases. The new stabilized APIs benefit anyone writing assertions or working with range types.
How to Upgrade
- Install the new version via rustup:
rustup update stable. - Run
rustc --versionto confirm the installation shows 1.96.0. - Update your project's
Cargo.tomlif you pin Rust versions manually. - Run tests:
cargo testto verify nothing breaks. - Check for any compatibility notes affecting your code, especially enums and
BTreeMapusage.
Usage Examples
- Stabilized
assert_matches!: Useassert_matches!(value, Pattern)to test patterns in unit tests with clear error messages. - NonZero range iteration: Loop over
NonZeroU8::MIN..NonZeroU8::MAXto process only non-zero values without manual checks. - Git + registry dependencies: Specify a local git repo and an alternate registry; Cargo uses the git source locally and the published crate on crates.io.
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.
Paste your workflow YAML to audit action versions and pinning.
Track These Releases