Skip to content
Rust Releases

Rust 1.96.0 Release Notes: Stabilized APIs & Cargo Fixes

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 […]

Jack Pauley June 18, 2026 6 min read
rust 1.96.0 release notes

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 ManuallyDrop as 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 NonZero integers.
  • 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-float flag.
  • Compatibility: Update minimum external LLVM to 21.
  • Compatibility: Change c_double to f32 on AVR targets.

Why It Matters

  • Maintenance release: no specific features or changes documented in release notes, but the stabilization of assert_matches! and debug_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

  1. Update your Rust toolchain: rustup update stable.
  2. Verify the installed version: rustc --version should print 1.96.0.
  3. Update Cargo dependencies: cargo update to pick up any new registry versions.
  4. Check for breaking changes by running cargo check on 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 NonZero integer 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_double now 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

View full release notes on GitHub β†’

πŸ› οΈ Try These Free Tools

πŸ“¦ Dependency EOL Scanner

Paste your dependency file to check for end-of-life packages.

πŸ—ΊοΈ Upgrade Path Planner

Plan your upgrade path with breaking change warnings and step-by-step guidance.

πŸ’° Kubernetes Cost Estimator

Compare EKS, GKE, and AKS monthly costs side by side.

See all free tools β†’

Stay Updated

Get the best releases delivered monthly. No spam, unsubscribe anytime.

By subscribing you agree to our Privacy Policy.