-
Warn against function pointers using unsupported ABI strings.
-
Check well-formedness of the source type’s signature in fn pointer casts. This partly closes a soundness hole that comes when casting a function item to function pointer
-
Use equality instead of subtyping when resolving type dependent paths.
-
Linking on macOS now correctly includes Rust’s default deployment target. Due to a linker bug, you might have to pass MACOSX_DEPLOYMENT_TARGET or fix your #[link] attributes to point to the correct frameworks. See https://github.com/rust-lang/rust/pull/129369.
-
Rust will now correctly raise an error for repr(Rust) written on non-struct/enum/union items, since it previously did not have any effect.
-
The future incompatibility lint deprecated_cfg_attr_crate_type_name has been made into a hard error. It was used to deny usage of #![crate_type] and #![crate_name] attributes in #![cfg_attr], which required a hack in the compiler to be able to change the used crate type and crate name after cfg expansion. Users can use --crate-type instead of #![cfg_attr(..., crate_type = "...")] and --crate-name instead of #![cfg_attr(..., crate_name = "...")] when running rustc/cargo rustc on the command line. Use of those two attributes outside of #![cfg_attr] continue to be fully supported.
-
Until now, paths into the sysroot were always prefixed with /rustc/$hash in diagnostics, codegen, backtrace, e.g.
thread 'main' panicked at 'hello world', map-panic.rs:2:50
stack backtrace:
0: std::panicking::begin_panic
at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:616:12
1: map_panic::main::{{closure}}
at ./map-panic.rs:2:50
2: core::option::Option<T>::map
at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/option.rs:929:29
3: map_panic::main
at ./map-panic.rs:2:30
4: core::ops::function::FnOnce::call_once
at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/ops/function.rs:248:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
RFC 3127 said
We want to change this behaviour such that, when rust-src source files can be discovered, the virtual path is discarded and therefore the local path will be embedded, unless there is a --remap-path-prefix that causes this local path to be remapped in the usual way.
#129687 implements this behaviour, when rust-src is present at compile time, rustc replaces /rustc/$hash with a real path into the local rust-src component with best effort. To sanitize this, users must explicitly supply --remap-path-prefix=<path to rust-src>=foo or not have the rust-src component installed.
-
The allow-by-default missing_docs lint used to disable itself when invoked through rustc --test/cargo test, resulting in #[expect(missing_docs)] emitting false positives due to the expectation being wrongly unfulfilled. This behavior has now been removed, which allows #[expect(missing_docs)] to be fulfilled in all scenarios, but will also report new missing_docs diagnostics for publicly reachable #[cfg(test)] items, integration test crate-level documentation, and publicly reachable items in integration tests.
-
The armv8r-none-eabihf target now uses the Armv8-R required set of floating-point features.
-
Fix a soundness bug where rustc wouldn’t detect unconstrained higher-ranked lifetimes in a dyn Trait‘s associated types that occur due to supertraits.
-
Update the minimum external LLVM version to 18.
-
Remove aarch64-fuchsia and x86_64-fuchsia target aliases in favor of aarch64-unknown-fuchsia and x86_64-unknown-fuchsia respectively.
-
The ABI-level exception class of a Rust panic is now encoded with native-endian bytes, so it is legible in hex dumps.
-
Visual Studio 2013 is no longer supported for MSVC targets.
-
The sysroot no longer contains the std dynamic library in its top-level lib/ dir.