Migrating to Rust Language 1.96.0
Version 1.96.0 introduces 10 breaking changes. This guide details how to update your code.
Released: 5/28/2026
⚠️ Check Your Code
If you use any of these symbols, you need to read this guide:
cfgManuallyDropassert_matches!debug_assert_matches!AssertUnwindSafeLazyCellLazyLockcore::range::RangeToInclusivecore::range::RangeToInclusiveItercore::range::RangeFromcore::range::RangeFromItercore::range::Rangecore::range::RangeItertarget.'cfg(..)'.rustdocflagsBreaking Changes
●Issue #1
The layout of `#[repr(Int)]` enums in edge cases involving fields of uninhabited zero-sized types has been fixed, which may change memory layout.
●Issue #2
Unsize-coercing into `Pin<Foo>` where `Foo` doesn't implement `Deref` is now prevented, as it previously produced a type with no useful public API.
●Issue #3
The accidentally stabilized `#![reexport_test_harness_main]` attribute is now gated.
●Issue #4
Errors are reported for return-position-impl-trait-in-traits whose types are too private.
●Issue #5
The `uninhabited_static` lint is now reported in dependencies and is deny-by-default.
●Issue #6
The `-Csoft-float` flag has been removed.
●Issue #7
Importing structs with `::{self [as name]}` (e.g., `struct S {}; use S::{self as Other};`) is no longer permitted because `{self}` imports require a module parent.
●Issue #8
For `export_name`, `link_name`, and `link_section` attributes, if multiple instances are present, the first one now takes precedence (previously behavior might have been different or undefined).
●Issue #9
The minimum external LLVM version required has been updated to 21.
●Issue #10
On `avr` targets, `c_double` is now changed to `f32` to match C's 32-bit `double` type on that target. This is a breaking change for code relying on `c_double` being 64-bit on `avr`.
Migration Steps
- 1If you relied on multi-line deprecation notes rendering across multiple lines in rustdoc, use two spaces followed by a newline (` \n`) within the deprecation note string to force a linebreak.
Release Summary
This release introduces stabilized range APIs, new `From` implementations for synchronization primitives, and several compiler and Cargo improvements. It also enforces stricter type checking and modifies behavior for certain attributes and imports.
Need More Details?
View the full release notes and all changes for Rust Language 1.96.0.
View Full Changelog