Version | Change log |
Rust 1.90.0 Oct 9, 2025 |
Language: Stabilize explicitly inferred const arguments (feature(generic_arg_infer)) Add a warn-by-default mismatched_lifetime_syntaxes lint. This lint detects when the same lifetime is referred to by different syntax categories between function arguments and return values, which can be confusing to read, especially in unsafe code. This lint supersedes the warn-by-default elided_named_lifetimes lint. Expand unpredictable_function_pointer_comparisons to also lint on function pointer comparisons in external macros Make the dangerous_implicit_autorefs lint deny-by-default Stabilize the avx512 target features Stabilize kl and widekl target features for x86 Stabilize sha512, sm3 and sm4 target features for x86 Stabilize LoongArch target features f, d, frecipe, lasx, lbt, lsx, and lvz Remove i128 and u128 from improper_ctypes_definitions Stabilize repr128 (#[repr(u128)], #[repr(i128)]) Allow #![doc(test(attr(..)))] everywhere Extend temporary lifetime extension to also go through tuple struct and tuple variant constructors extern "C" functions on the wasm32-unknown-unknown target now have a standards compliant ABI Compiler: Default to non-leaf frame pointers on aarch64-linux Enable non-leaf frame pointers for Arm64EC Windows Set Apple frame pointers by architecture Platform Support: Add new Tier-3 targets loongarch32-unknown-none and loongarch32-unknown-none-softfloat x86_64-apple-darwin is in the process of being demoted to Tier 2 with host tools Libraries: Specify the base path for file! Allow storing format_args!() in a variable Add #[must_use] to [T; N]::map Implement DerefMut for Lazy{Cell,Lock} Implement Default for array::IntoIter Implement Clone for slice::ChunkBy Implement io::Seek for io::Take Stabilized APIs: NonZero<char> Many intrinsics for x86, not enumerated here AVX512 intrinsics SHA512, SM3 and SM4 intrinsics File::lock File::lock_shared File::try_lock File::try_lock_shared File::unlock NonNull::from_ref NonNull::from_mut NonNull::without_ |
Rust 1.88.0 Jun 27, 2025 |
Language: Stabilize #![feature(let_chains)] in the 2024 edition. This feature allows &&-chaining let statements inside if and while, allowing intermixture with boolean expressions. The patterns inside the let sub-expressions can be irrefutable or refutable. Stabilize #![feature(naked_functions)]. Naked functions allow writing functions with no compiler-generated epilogue and prologue, allowing full control over the generated assembly for a particular function. Stabilize #![feature(cfg_boolean_literals)]. This allows using boolean literals as cfg predicates, e.g. #[cfg(true)] and #[cfg(false)]. Fully de-stabilize the #[bench] attribute. Usage of #[bench] without #![feature(custom_test_frameworks)] already triggered a deny-by-default future-incompatibility lint since Rust 1.77, but will now become a hard error. Add warn-by-default dangerous_implicit_autorefs lint against implicit autoref of raw pointer dereference. The lint will be bumped to deny-by-default in the next version of Rust. Add invalid_null_arguments lint to prevent invalid usage of null pointers. This lint is uplifted from clippy::invalid_null_ptr_usage. Change trait impl candidate preference for builtin impls and trivial where-clauses. Check types of generic const parameter defaults Compiler: Stabilize -Cdwarf-version for selecting the version of DWARF debug information to generate. Platform Support: Demote i686-pc-windows-gnu to Tier 2. Refer to Rust's platform support page for more information on Rust's tiered platform support. Libraries: Remove backticks from #[should_panic] test failure message. Guarantee that [T; N]::from_fn is generated in order of increasing indices., for those passing it a stateful closure. The libtest flag --nocapture is deprecated in favor of the more consistent --no-capture flag. Guarantee that {float}::NAN is a quiet NaN. Stabilized APIs: Cell::update impl Default for *const T impl Default for *mut T HashMap::extract_if HashSet::extract_if proc_macro::Span::line proc_macro::S |
Rust 1.87.0 May 15, 2025 |
Language: Stabilize asm_goto feature Allow parsing open beginning ranges (..EXPR) after unary operators !, -, and *. Don't require method impls for methods with Self: Sized bounds in impls for unsized types Stabilize feature(precise_capturing_in_traits) allowing use<...> bounds on return position impl Trait in traits Compiler: x86: make SSE2 required for i686 targets and use it to pass SIMD types Platform Support: Remove i586-pc-windows-msvc target Refer to Rust's platform support page for more information on Rust's tiered platform support. Libraries: Stabilize the anonymous pipe API Add support for unbounded left/right shift operations Print pointer metadata in Debug impl of raw pointers Vec::with_capacity guarantees it allocates with the amount requested, even if Vec::capacity returns a different number. Most std::arch intrinsics which don't take pointer arguments can now be called from safe code if the caller has the appropriate target features already enabled (rust-lang/stdarch#1714, rust-lang/stdarch#1716, rust-lang/stdarch#1717) Undeprecate env::home_dir Denote ControlFlow as #[must_use] Macros such as assert_eq! and vec! now support const {...} expressions Stabilized APIs: Vec::extract_if vec::ExtractIf LinkedList::extract_if linked_list::ExtractIf <[T]>::split_off <[T]>::split_off_mut <[T]>::split_off_first <[T]>::split_off_first_mut <[T]>::split_off_last <[T]>::split_off_last_mut String::extend_from_within os_str::Display OsString::display OsStr::display io::pipe io::PipeReader io::PipeWriter impl From<PipeReader> for OwnedHandle impl From<PipeWriter> for OwnedHandle impl From<PipeReader> for Stdio impl From<PipeWriter> for Stdio impl From<PipeReader> for OwnedFd impl From<PipeWriter> for OwnedFd Box<MaybeUninit<T>>::write impl TryFrom<Vec<u8>> for String <*const T>::offset_from_unsigned <*const T>::byte_offset_from_unsigned <*mut T>::offs |
Rust 1.86.0 Apr 13, 2025 |
Language: Stabilize upcasting trait objects to supertraits. Allow safe functions to be marked with the #[target_feature] attribute. The missing_abi lint now warns-by-default. Rust now lints about double negations, to catch cases that might have intended to be a prefix decrement operator (--x) as written in other languages. This was previously a clippy lint, clippy::double_neg, and is now available directly in Rust as double_negations. More pointers are now detected as definitely not-null based on their alignment in const eval. Empty repr() attribute applied to invalid items are now correctly rejected. Inner attributes #![test] and #![rustfmt::skip] are no longer accepted in more places than intended. Compiler: Debug-assert that raw pointers are non-null on access. Change -O to mean -C opt-level=3 instead of -C opt-level=2 to match Cargo's defaults. Fix emission of overflowing_literals under certain macro environments. Platform Support: Replace i686-unknown-redox target with i586-unknown-redox. Increase baseline CPU of i686-unknown-hurd-gnu to Pentium 4. New tier 3 targets: {aarch64-unknown,x86_64-pc}-nto-qnx710_iosock. For supporting Neutrino QNX 7.1 with io-socket network stack. {aarch64-unknown,x86_64-pc}-nto-qnx800. For supporting Neutrino QNX 8.0 (no_std-only). {x86_64,i686}-win7-windows-gnu. Intended for backwards compatibility with Windows 7. {x86_64,i686}-win7-windows-msvc are the Windows MSVC counterparts that already exist as Tier 3 targets. amdgcn-amd-amdhsa. x86_64-pc-cygwin. {mips,mipsel}-mti-none-elf. Initial bare-metal support. m68k-unknown-none-elf. armv7a-nuttx-{eabi,eabihf}, aarch64-unknown-nuttx, and thumbv7a-nuttx-{eabi,eabihf}. Refer to Rust's platform support page for more information on Rust's tiered platform support. Libraries: The type of FromBytesWithNulError in CStr::from_bytes_with_nul(bytes: &[u8]) -> Result<&Self, FromBytesWithNulError> was changed from an opaque struct to an enum, allowing users to examine why the conversion fa |
Rust 1.85.1 Mar 18, 2025 |
Language: Stabilize &mut, *mut, &Cell, and *const Cell in const. Allow creating references to statics in const initializers. Implement raw lifetimes and labels ('r#ident). Define behavior when atomic and non-atomic reads race. Non-exhaustive structs may now be empty. Disallow implicit coercions from places of type ! const extern functions can now be defined for other calling conventions. Stabilize expr_2021 macro fragment specifier in all editions. The non_local_definitions lint now fires on less code and warns by default. Compiler: Deprecate unsound -Csoft-float flag. Add many new tier 3 targets: aarch64_unknown_nto_qnx700 arm64e-apple-tvos armv7-rtems-eabihf loongarch64-unknown-linux-ohos riscv32-wrs-vxworks and riscv64-wrs-vxworks riscv32{e|em|emc}-unknown-none-elf x86_64-unknown-hurd-gnu x86_64-unknown-trusty Refer to Rust's platform support page for more information on Rust's tiered platform support. Libraries: Implement PartialEq for ExitCode. Document that catch_unwind can deal with foreign exceptions without UB, although the exact behavior is unspecified. Implement Default for HashMap/HashSet iterators that don't already have it. Bump Unicode to version 16.0.0. Change documentation of ptr::add/sub to not claim equivalence with offset.. Stabilized APIs: BufRead::skip_until ControlFlow::break_value ControlFlow::continue_value ControlFlow::map_break ControlFlow::map_continue DebugList::finish_non_exhaustive DebugMap::finish_non_exhaustive DebugSet::finish_non_exhaustive DebugTuple::finish_non_exhaustive ErrorKind::ArgumentListTooLong ErrorKind::Deadlock ErrorKind::DirectoryNotEmpty ErrorKind::ExecutableFileBusy ErrorKind::FileTooLarge ErrorKind::HostUnreachable ErrorKind::IsADirectory ErrorKind::NetworkDown ErrorKind::NetworkUnreachable ErrorKind::NotADirectory ErrorKind::NotSeekable ErrorKind::ReadOnlyFilesystem ErrorKind::ResourceBusy ErrorKind::StaleNetworkFileHandle ErrorKind::StorageFull ErrorKind::TooManyLinks Option::get_or_insert_default Waker::data Wak |
Rust 1.85.0 Feb 20, 2025 |
Language: Stabilize &mut, *mut, &Cell, and *const Cell in const. Allow creating references to statics in const initializers. Implement raw lifetimes and labels ('r#ident). Define behavior when atomic and non-atomic reads race. Non-exhaustive structs may now be empty. Disallow implicit coercions from places of type ! const extern functions can now be defined for other calling conventions. Stabilize expr_2021 macro fragment specifier in all editions. The non_local_definitions lint now fires on less code and warns by default. Compiler: Deprecate unsound -Csoft-float flag. Add many new tier 3 targets: aarch64_unknown_nto_qnx700 arm64e-apple-tvos armv7-rtems-eabihf loongarch64-unknown-linux-ohos riscv32-wrs-vxworks and riscv64-wrs-vxworks riscv32{e|em|emc}-unknown-none-elf x86_64-unknown-hurd-gnu x86_64-unknown-trusty Refer to Rust's platform support page for more information on Rust's tiered platform support. Libraries: Implement PartialEq for ExitCode. Document that catch_unwind can deal with foreign exceptions without UB, although the exact behavior is unspecified. Implement Default for HashMap/HashSet iterators that don't already have it. Bump Unicode to version 16.0.0. Change documentation of ptr::add/sub to not claim equivalence with offset.. Stabilized APIs: BufRead::skip_until ControlFlow::break_value ControlFlow::continue_value ControlFlow::map_break ControlFlow::map_continue DebugList::finish_non_exhaustive DebugMap::finish_non_exhaustive DebugSet::finish_non_exhaustive DebugTuple::finish_non_exhaustive ErrorKind::ArgumentListTooLong ErrorKind::Deadlock ErrorKind::DirectoryNotEmpty ErrorKind::ExecutableFileBusy ErrorKind::FileTooLarge ErrorKind::HostUnreachable ErrorKind::IsADirectory ErrorKind::NetworkDown ErrorKind::NetworkUnreachable ErrorKind::NotADirectory ErrorKind::NotSeekable ErrorKind::ReadOnlyFilesystem ErrorKind::ResourceBusy ErrorKind::StaleNetworkFileHandle ErrorKind::StorageFull ErrorKind::TooManyLinks Option::get_or_insert_default Waker::data Wak |
Rust 1.84.1 Jan 30, 2025 |
Language: Stabilize &mut, *mut, &Cell, and *const Cell in const. Allow creating references to statics in const initializers. Implement raw lifetimes and labels ('r#ident). Define behavior when atomic and non-atomic reads race. Non-exhaustive structs may now be empty. Disallow implicit coercions from places of type ! const extern functions can now be defined for other calling conventions. Stabilize expr_2021 macro fragment specifier in all editions. The non_local_definitions lint now fires on less code and warns by default. Compiler: Deprecate unsound -Csoft-float flag. Add many new tier 3 targets: aarch64_unknown_nto_qnx700 arm64e-apple-tvos armv7-rtems-eabihf loongarch64-unknown-linux-ohos riscv32-wrs-vxworks and riscv64-wrs-vxworks riscv32{e|em|emc}-unknown-none-elf x86_64-unknown-hurd-gnu x86_64-unknown-trusty Refer to Rust's platform support page for more information on Rust's tiered platform support. Libraries: Implement PartialEq for ExitCode. Document that catch_unwind can deal with foreign exceptions without UB, although the exact behavior is unspecified. Implement Default for HashMap/HashSet iterators that don't already have it. Bump Unicode to version 16.0.0. Change documentation of ptr::add/sub to not claim equivalence with offset.. Stabilized APIs: BufRead::skip_until ControlFlow::break_value ControlFlow::continue_value ControlFlow::map_break ControlFlow::map_continue DebugList::finish_non_exhaustive DebugMap::finish_non_exhaustive DebugSet::finish_non_exhaustive DebugTuple::finish_non_exhaustive ErrorKind::ArgumentListTooLong ErrorKind::Deadlock ErrorKind::DirectoryNotEmpty ErrorKind::ExecutableFileBusy ErrorKind::FileTooLarge ErrorKind::HostUnreachable ErrorKind::IsADirectory ErrorKind::NetworkDown ErrorKind::NetworkUnreachable ErrorKind::NotADirectory ErrorKind::NotSeekable ErrorKind::ReadOnlyFilesystem ErrorKind::ResourceBusy ErrorKind::StaleNetworkFileHandle ErrorKind::StorageFull ErrorKind::TooManyLinks Option::get_or_insert_default Waker::data Wak |
Rust 1.83.0 Nov 28, 2024 |
Language: Stabilize &mut, *mut, &Cell, and *const Cell in const. Allow creating references to statics in const initializers. Implement raw lifetimes and labels ('r#ident). Define behavior when atomic and non-atomic reads race. Non-exhaustive structs may now be empty. Disallow implicit coercions from places of type ! const extern functions can now be defined for other calling conventions. Stabilize expr_2021 macro fragment specifier in all editions. The non_local_definitions lint now fires on less code and warns by default. Compiler: Deprecate unsound -Csoft-float flag. Add many new tier 3 targets: aarch64_unknown_nto_qnx700 arm64e-apple-tvos armv7-rtems-eabihf loongarch64-unknown-linux-ohos riscv32-wrs-vxworks and riscv64-wrs-vxworks riscv32{e|em|emc}-unknown-none-elf x86_64-unknown-hurd-gnu x86_64-unknown-trusty Refer to Rust's platform support page for more information on Rust's tiered platform support. Libraries: Implement PartialEq for ExitCode. Document that catch_unwind can deal with foreign exceptions without UB, although the exact behavior is unspecified. Implement Default for HashMap/HashSet iterators that don't already have it. Bump Unicode to version 16.0.0. Change documentation of ptr::add/sub to not claim equivalence with offset.. Stabilized APIs: BufRead::skip_until ControlFlow::break_value ControlFlow::continue_value ControlFlow::map_break ControlFlow::map_continue DebugList::finish_non_exhaustive DebugMap::finish_non_exhaustive DebugSet::finish_non_exhaustive DebugTuple::finish_non_exhaustive ErrorKind::ArgumentListTooLong ErrorKind::Deadlock ErrorKind::DirectoryNotEmpty ErrorKind::ExecutableFileBusy ErrorKind::FileTooLarge ErrorKind::HostUnreachable ErrorKind::IsADirectory ErrorKind::NetworkDown ErrorKind::NetworkUnreachable ErrorKind::NotADirectory ErrorKind::NotSeekable ErrorKind::ReadOnlyFilesystem ErrorKind::ResourceBusy ErrorKind::StaleNetworkFileHandle ErrorKind::StorageFull ErrorKind::TooManyLinks Option::get_or_insert_default Waker::data Wak |
Rust 1.82.0 Oct 17, 2024 |
Language: Don't make statement nonterminals match pattern nonterminals Patterns matching empty types can now be omitted in common cases Enforce supertrait outlives obligations when using trait impls addr_of(_mut)! macros and the newly stabilized &raw (const|mut) are now safe to use with all static items size_of_val_raw: for length 0 this is safe to call Reorder trait bound modifiers after for<...> binder in trait bounds Stabilize opaque type precise capturing (RFC 3617) Stabilize &raw const and &raw mut operators (RFC 2582) Stabilize unsafe extern blocks (RFC 3484) Stabilize nested field access in offset_of! Do not require T to be live when dropping [T; 0] Stabilize const operands in inline assembly Stabilize floating-point arithmetic in const fn Stabilize explicit opt-in to unsafe attributes Document NaN bit patterns guarantees Compiler: Promote riscv64gc-unknown-linux-musl to tier 2 Promote Mac Catalyst targets aarch64-apple-ios-macabi and x86_64-apple-ios-macabi to Tier 2, and ship them with rustup Add tier 3 NuttX based targets for RISC-V and ARM Add tier 3 powerpc-unknown-linux-muslspe target Improved diagnostics to explain why a pattern is unreachable The compiler now triggers the unreachable code warning properly for async functions that don't return/are -> ! Promote aarch64-apple-darwin to Tier 1 Add Trusty OS target aarch64-unknown-trusty and armv7-unknown-trusty as tier 3 targets Promote wasm32-wasip2 to Tier 2. Libraries: Generalize {Rc,Arc}::make_mut() to Path, OsStr, and CStr. Stabilized APIs: std::thread::Builder::spawn_unchecked std::str::CharIndices::offset std::option::Option::is_none_or [T]::is_sorted [T]::is_sorted_by [T]::is_sorted_by_key Iterator::is_sorted Iterator::is_sorted_by Iterator::is_sorted_by_key std::future::Ready::into_inner std::iter::repeat_n impl<T: Clone> DoubleEndedIterator for Take<Repeat<T>> impl<T: Clone> ExactSizeIterator for Take<Repeat<T>> impl<T: Clone> ExactSizeIterator |
Rust 1.81.0 Sep 5, 2024 |
Fix miscompilation in the jump threading MIR optimization when comparing floats Revert changes to the dead_code lint from 1.80.0 |