Language
- Stabilize
if letguards on match arms irrefutable_let_patternslint no longer lints on let chains- Support importing path-segment keywords with renaming
- Stabilize inline assembly for PowerPC and PowerPC64
- const-eval: be more consistent in the behavior of padding during typed copies
- Const blocks are no longer evaluated to determine if expressions involving fallible operations can implicitly be constant-promoted.. Expressions whose ability to implicitly be promoted would depend on the result of a const block are no longer implicitly promoted.
- Make operational semantics of pattern matching independent of crate and module
Compiler
- Stabilize
--remap-path-scopefor controlling the scoping of how paths get remapped in the resulting binary - Apply patches for CVE-2026-6042 and CVE-2026-40200 to vendored musl
Platform Support
- Promote
powerpc64-unknown-linux-muslto Tier 2 with host tools - Promote
aarch64-apple-tvosto Tier 2 - Promote
aarch64-apple-tvos-simto Tier 2 - Promote
aarch64-apple-watchosto Tier 2 - Promote
aarch64-apple-watchos-simto Tier 2 - Promote
aarch64-apple-visionosto Tier 2 - Promote
aarch64-apple-visionos-simto Tier 2
Refer to Rust's platform support page for more information on Rust's tiered platform support.
Libraries
thread::scope: document how join interacts with TLS destructors- Speed up
str::containson aarch64 targets withneontarget feature enabled by default
Stabilized APIs
MaybeUninit<[T; N]>: From<[MaybeUninit<T>; N]>MaybeUninit<[T; N]>: AsRef<[MaybeUninit<T>; N]>MaybeUninit<[T; N]>: AsRef<[MaybeUninit<T>]>MaybeUninit<[T; N]>: AsMut<[MaybeUninit<T>; N]>MaybeUninit<[T; N]>: AsMut<[MaybeUninit<T>]>[MaybeUninit<T>; N]: From<MaybeUninit<[T; N]>>Cell<[T; N]>: AsRef<[Cell<T>; N]>Cell<[T; N]>: AsRef<[Cell<T>]>Cell<[T]>: AsRef<[Cell<T>]>bool: TryFrom<{integer}>AtomicPtr::updateAtomicPtr::try_updateAtomicBool::updateAtomicBool::try_updateAtomicIn::updateAtomicIn::try_updateAtomicUn::updateAtomicUn::try_updatecfg_select!mod core::rangecore::range::RangeInclusivecore::range::RangeInclusiveItercore::hint::cold_path<*const T>::as_ref_unchecked<*mut T>::as_ref_unchecked<*mut T>::as_mut_uncheckedVec::push_mutVec::insert_mutVecDeque::push_front_mutVecDeque::push_back_mutVecDeque::insert_mutLinkedList::push_front_mutLinkedList::push_back_mutLayout::dangling_ptrLayout::repeatLayout::repeat_packedLayout::extend_packed
These previously stable APIs are now stable in const contexts:
Rustdoc
Compatibility Notes
- Array coercions may now result in less inference constraints than before
- Importing
$cratewithout renaming, i.e.use $crate::{self};, is now no longer permitted due to stricter error checking forselfimports. - const-eval: be more consistent in the behavior of padding during typed copies. In very rare cases, this may cause compilation errors due to bytes from parts of a pointer ending up in the padding bytes of a
constorstatic. - A future-incompatibility warning lint
ambiguous_glob_imported_traitsis now reported when using an ambiguously glob imported trait - Check lifetime bounds of types mentioning only type parameters
- Report more visibility-related ambiguous import errors
- Deprecate
Eq::assert_receiver_is_total_eqand emit future compatibility warnings on manual impls - powerpc64: Use the ELF ABI version set in target spec instead of guessing (fixes the ELF ABI used by the OpenBSD target)
- Matching on a
#[non_exhaustive]enum now reads the discriminant, even if the enum has only one variant. This can cause closures to capture values that they previously wouldn't. mut refandmut ref mutpatterns, part of the unstable Match Ergonomics 2024 RFC, were accidentally allowed on stable within struct pattern field shorthand. These patterns are now correctly feature-gated as unstable in this position.- Add future-compatibility warning for derive helper attributes which conflict with built-in attributes
- JSON target specs have been destabilized and now require
-Z unstable-optionsto use. Previously, they could not be used without the standard library, which has no stable build mechanism. In preparation for thebuild-stdproject adding that support, JSON target specs are being proactively gated to ensure they remain unstable even ifbuild-stdis stabilized. Cargo now includes the-Z json-target-specCLI flag to automatically pass-Z unstable-optionsto the compiler when needed. See #150151, #151534, and rust-lang/cargo#16557. - The arguments of
#[feature]attributes on invalid targets are now checked
Internal Changes
These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools.