← Back to all releases

Rust 1.92.0

Released on December 11, 2025

What's Changed

Full Changelog

Language

--------

- Document MaybeUninit representation and validity

- Allow &raw [mut | const] for union field in safe code

- Prefer item bounds of associated types over where-bounds for auto-traits and Sized

- Do not materialize X in [X; 0] when X is unsizing a const

- Support combining #[track_caller] and #[no_mangle] (requires every declaration specifying #[track_caller] as well)

- Make never type lints never_type_fallback_flowing_into_unsafe and dependency_on_unit_never_type_fallback deny-by-default

- Allow specifying multiple bounds for same associated item, except in trait objects

- Slightly strengthen higher-ranked region handling in coherence

- The unused_must_use lint no longer warns on Result<(), Uninhabited> (for instance, Result<(), !>), or ControlFlow. This avoids having to check for an error that can never happen.

Compiler

--------

- Make mips64el-unknown-linux-muslabi64 link dynamically

- Remove current code for embedding command-line args in PDB

Command-line information is typically not needed by debugging tools, and the removed code

was causing problems for incremental builds even on targets that don't use PDB debuginfo.

Libraries

---------

- Specialize Iterator::eq{_by} for TrustedLen iterators

- Simplify Extend for tuples

- Added details to Debug for EncodeWide.

- iter::Repeat::last and count will now panic, rather than looping infinitely.

Stabilized APIs

---------------

- NonZero::div_ceil

- Location::file_as_c_str

- RwLockWriteGuard::downgrade

- Box::new_zeroed

- Box::new_zeroed_slice

- Rc::new_zeroed

- Rc::new_zeroed_slice

- Arc::new_zeroed

- Arc::new_zeroed_slice

- btree_map::Entry::insert_entry

- btree_map::VacantEntry::insert_entry

- impl Extend for proc_macro::TokenStream

- impl Extend for proc_macro::TokenStream

- impl Extend for proc_macro::TokenStream

- impl Extend for proc_macro::TokenStream

These previously stable APIs are now stable in const contexts:

- <[_]>::rotate_left

- <[_]>::rotate_right

Cargo

-----

- Added a new chapter to the Cargo book, "Optimizing Build Performance".

Rustdoc

-----

- If a trait item appears in rustdoc search, hide the corresponding impl items. Previously a search for "last" would show both Iterator::last as well as impl methods like std::vec::IntoIter::last. Now these impl methods will be hidden, freeing up space for inherent methods like BTreeSet::last.

- Relax rules for identifiers in search. Previously you could only search for identifiers that were valid in rust code, now searches only need to be valid as part of an identifier. For example, you can now perform a search that starts with a digit.

Compatibility Notes

-------------------

* Fix backtraces with -C panic=abort on Linux by generating unwind tables by default. Build with -C force-unwind-tables=no to keep omitting unwind tables.

- As part of the larger effort refactoring compiler built-in attributes and their diagnostics, the future-compatibility lint invalid_macro_export_arguments is upgraded to deny-by-default and will be reported in dependencies too.

- Update the minimum external LLVM to 20

- Prevent downstream impl DerefMut for Pin

- Don't apply temporary lifetime extension rules to the arguments of non-extended pin! and formatting macros