Language
- Stabilize never type
- Lint against repeated
#[repr(..)]attributes - Stabilize
extern "custom" - Extend
dropping_references,dropping_copy_typesandundropped_manually_dropslints todrop_in_place unfulfilled_lint_expectationsno longer fires on#[expect(dead_code)]inside code that is covered by a dead parent's diagnostic- Turn the error for
repr(align)fields in arepr(packed)type into a deny-by-default lintaligned_fields_in_packed - volatile: allow accesses to non-AM memory to trap
Compiler
Platform Support
i686-pc-windows-gnuis now a tier 2 without host tools target- Promote
wasm32-wasip3to Tier 2 - Add new Tier 3 target
powerpc64-sony-ps3
Refer to Rust's platform support page for more information on Rust's tiered platform support.
Libraries
- Stabilize custom allocators
- Map
ENOTSUPtoErrorKind::Unsupported - Fix soundness issues in
std::sys::pal::sgx::waitqueue::unsafe_list
Stabilized APIs
impl PartialEq<Cow<'_, [U]>> for Vec<T, A>impl PartialEq<Cow<'_, [U]>> for &[T]impl PartialEq<Cow<'_, [U]>> for &mut [T]std::alloc::Allocatorstd::alloc::Globalstd::alloc::Systemimpl Allocator for Globalimpl Allocator for Systemimpl<A: Allocator> Allocator for &Aimpl<T: Allocator, A: Allocator> Allocator for Box<T, A>impl<A: Allocator> Allocator for &mut Aimpl<T: Allocator, A: Allocator> Allocator for Arc<T, A>impl<T: Allocator, A: Allocator> Allocator for Rc<T, A>Box::new_inBox::from_raw_inBox::from_non_null_inBox::into_raw_with_allocatorBox::into_non_null_with_allocatorBox::allocatorVec::new_inVec::with_capacity_inVec::from_raw_parts_inVec::from_parts_inVec::into_raw_parts_with_allocatorVec::into_parts_with_allocatorVec::allocatorChild::main_thread_handleimpl Default for std::sync::Oncebool::toggleBox::takeBox::mapRc::mapArc::mapimpl AsRef<T> for !impl AsMut<T> for !core::mem::DropGuardcore::mem::conjure_zstUnsafeCell::replaceUnsafeCell::as_ref_uncheckedUnsafeCell::as_mut_uncheckedstr::trim_prefixstr::trim_suffix[T]::trim_prefix[T]::trim_suffixPath::trim_prefixVec::from_fnos::windows::process::CommandExt::show_window
Cargo
- Introduced Cargo's own linting system: some Cargo warnings are now emitted as lints that users can control in the
[lints.cargo]table. This includes a new built-in unused dependency check via thecargo::unused_dependencieslint. docs #17298 - Introduced minimum publish age configurations, also known as dependency cooldowns. When the relevant config is set, the resolver ignores versions published more recently than that, unless they are already in
Cargo.lock. (RFC 3923) docs #17335 - cargo-install: now uses the existing lockfile in the
.cratetarball by default.--lockedin cargo install becomes a no-op. #17388 - Cargo now uses a new directory layout for intermediate build artifacts. Tools that inspect the build directory may need to use Cargo’s JSON messages to locate build artifacts instead of relying on the build directory layout. The layout is not a stable interface and is subject to change. (build cache doc) #17354
Rustdoc
Compatibility Notes
- Closures now more precisely capture variables used in
if let. This may cause new errors - Check dyn-compatibility of trait objects in more places
Infallibleis now a type alias to!- The never type fallback was changed to
!on all editions boxpatterns are no longer syntactically allowed- Report Query Cycle errors in more cases when computing the layout of enums with explicit discriminants
- Always escape grapheme extenders in
str::escape_debug - Make let-else respect
macro_rulesexprmetavariable grouping Iterator::{min,max}(_by_key)changed whichOrdmethods they use. This cannot change behaviour (other than being potentially faster) for types correctly following theOrdrules, but may impact types with inconsistent trait implementations.- Emit an error when trying to enable SSE/AVX on an x86 (32bit or 64bit) softfloat target
- Require windowed (and exception) for Xtensa ABI
- windows-gnullvm: always link libunwind statically
- From version 1.94 up to 1.100 a number of ARMv7-A hardfloat targets required the
VFPv3-D32FPU as a minimum, as they erroneously had thed32feature in their baseline list of features. Breakage introduced as a result of correcting this can be fixed by passing-Ctarget-feature=+d32to Rust. - Change "Rust" ABI on x86 to use SSE registers if they are always-available for the current target
- Make the
ambiguous_glob_imported_traitslint fire in slightly more cases - Make
+fix-cortex-a53-835769a default feature foraarch64-unknown-fuchsia - Some impls on
Boxhave been generalised to arbitrary allocators, which may cause new type inference errors - The standard library now uses Unicode version 18.0.0
- WASI SDK version was bumped from 33 to 34
- On ARM targets,
-Ctarget-feature/-Ctarget-cpuvalues that would alter the ABI are rejected as hard errors now.