Language
- Allow passing
exprmetavariable tocfg - Always coerce never types in tuple expressions
- Avoid incorrect inference guidance of function arguments in rare cases
- Support s390x vector registers in inline assembly
- Allow using constants of type
ManuallyDropas patterns (fixing a regression introduced in 1.94.0)
Compiler
- Enable link relaxation feature for LoongArch Linux targets
- Update
riscv64gc-unknown-fuchsiabaseline to RVA22 + vector
Libraries
- Support iterating over ranges of
NonZerointegers - refactor 'valid for read/write' definition: exclude null; add that as an exception on individual methods instead
- Fix SGX delayed host lookup via ToSocketAddr
Stabilized APIs
assert_matches!debug_assert_matches!From<T> for AssertUnwindSafe<T>From<T> for LazyCell<T, F>From<T> for LazyLock<T, F>core::range::RangeToInclusivecore::range::RangeToInclusiveItercore::range::RangeFromcore::range::RangeFromItercore::range::Rangecore::range::RangeIter
Cargo
- Allow a dependency to specify both a git repository and an alternate registry. Just like with crates.io, the git repository will be used locally, but the registry version will be used when published.
- Added
target.'cfg(..)'.rustdocflagssupport in configuration. - Fixed CVE-2026-5222 and CVE-2026-5223.
Rustdoc
- Deprecation notes are now rendered like any other documentation. Previously they used the css
white-space: pre-wrap;property and stripped any<p>elements from the rendered html, however this caused issues and unintuitive behavior. The new behavior should be more predictable, however some multi-line deprecation notes will now be rendered as as single lines. If this is undesirable, you can use the standard markdown method of forcing a linebreak, which is two spaces followed by a newline ("\n"). - Don't emit rustdoc
missing_doc_code_exampleslint on impl items - Separate methods and associated functions in sidebar
Compatibility Notes
- Fix layout of
#[repr(Int)]enums in some edge cases involving fields of uninhabited zero-sized types - Prevent unsize-coercing into
Pin<Foo>whereFoodoesn't implementDeref. Some such coercions were previously allowed, but produce a type with no useful public API. - rustc: Stop passing
--allow-undefinedon wasm targets - Gate the accidentally stabilized
#![reexport_test_harness_main]attribute - Error on return-position-impl-trait-in-traits whose types are too private
- Report the
uninhabited_staticlint in dependencies and make it deny-by-default - Distributed builds now contain non-split debuginfo for windows-gnu This appears to improve the quality of backtraces. This change has no effect on the defaults for the output of rustc/cargo on these targets.
- Check const generic arguments are correctly typed in more positions
- Remove
-Csoft-float - Importing structs with
::{self [as name]}, e.g.,struct S {}; use S::{self as Other};, is now no longer permitted because{self}imports require a module parent. - For
export_name,link_name, andlink_sectionattributes, if multiple of the same attribute is present, the first one now takes precedence. - Update the minimum external LLVM to 21
- On
avrtargets, C'sdoubletype is 32-bit by default, so changec_doubletof32onavrtargets to match. This is a breaking change, but necessary to makec_doublematch C's double.
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.