Rust versions / 1.94
Rust release · Mar 5, 2026
Rust 1.94: what's new, what was stabilized
Short answerRust 1.94 was released on Mar 5, 2026: 1 language stabilization (Stabilize additional 29 RISC-V target features including large portions of the RVA22U64 / ...); 18 newly stable APIs (<[T]>::array_windows, <[T]>::element_offset, LazyCell::get, LazyCell::get_mut, ...); 10 compatibility notes that can affect existing code. Point release: 1.94.1 (Mar 26, 2026).
← Rust 1.93All versionsRust 1.95 →
Language features stabilized
- Stabilize additional 29 RISC-V target features including large portions of the RVA22U64 / RVA23U64 profiles
18 APIs stabilized
<[T]>::array_windows, <[T]>::element_offset, LazyCell::get, LazyCell::get_mut, LazyCell::force_mut, LazyLock::get, LazyLock::get_mut, LazyLock::force_mut, impl TryFrom<char> for usize, std::iter::Peekable::next_if_map, std::iter::Peekable::next_if_map_mut, avx512fp16, f32::consts::EULER_GAMMA, f64::consts::EULER_GAMMA, f32::consts::GOLDEN_RATIO, f64::consts::GOLDEN_RATIO, f32::mul_add, f64::mul_add
Can it break my build?
The release lists these compatibility notes. Most only affect rare code, but read them before you raise your toolchain in CI:
- Forbid freely casting lifetime bounds of
dyn-types - Make closure capturing have consistent and correct behaviour around patterns
- [Standard library macros are now imported via prelude, not via injected
#[macro_use]](https://github.com/rust-lang/rust/pull/139493) - Don't strip shebang in expression-context
include!(…)s - Ambiguous glob reexports are now also visible cross-crate
- Don't normalize where-clauses before checking well-formedness
- Introduce a future compatibility warning on codegen attributes on body-free trait methods
- On Windows
std::time::SystemTime::checked_sub_durationwill returnNonefor times before the Windows epoch (1/1/1601) - Lifetime identifiers such as
'aare now NFC normalized. - Overhaul filename handling for cross-compiler consistency
Use it
rustup update stable # get the newest release
rustup install 1.94 # or exactly this one
rustup override set 1.94 # pin a project to itTo require at least this version from users of your crate, set rust-version = "1.94" under [package] in Cargo.toml. Cargo then refuses to build it on older compilers with a clear message, and with resolver 3 (the default on the 2024 edition, Rust 1.85+) it also prefers dependency versions that support it.
Full release notes
Language
- Impls and impl items inherit
dead_codelint level of the corresponding traits and trait items - Stabilize additional 29 RISC-V target features including large portions of the RVA22U64 / RVA23U64 profiles
- Add warn-by-default
unused_visibilitieslint for visibility onconst _declarations - Update to Unicode 17
- Avoid incorrect lifetime errors for closures
<a id="1.94.0-Platform-Support"></a>
Platform Support
Refer to Rust's platform support page for more information on Rust's tiered platform support.
<a id="1.94.0-Libraries"></a>
Libraries
<a id="1.94.0-Stabilized-APIs"></a>
Stabilized APIs
- [
<[T]>::array_windows](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.array_windows) - [
<[T]>::element_offset](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.element_offset) LazyCell::getLazyCell::get_mutLazyCell::force_mutLazyLock::getLazyLock::get_mutLazyLock::force_mutimpl TryFrom<char> for usizestd::iter::Peekable::next_if_mapstd::iter::Peekable::next_if_map_mut- x86
avx512fp16intrinsics (excluding those that depend directly on the unstablef16type) - AArch64 NEON fp16 intrinsics (excluding those that depend directly on the unstable
f16type) f32::consts::EULER_GAMMAf64::consts::EULER_GAMMAf32::consts::GOLDEN_RATIOf64::consts::GOLDEN_RATIO
These previously stable APIs are now stable in const contexts:
<a id="1.94.0-Cargo"></a>
Cargo
- Stabilize the config include key. The top-level include config key allows loading additional config files, enabling better organization, sharing, and management of Cargo configurations across projects and environments. docs #16284
- Stabilize the pubtime field in registry index. This records when a crate version was published and enables time-based dependency resolution in the future. Note that crates.io will gradually backfill existing packages when a new version is published. Not all crates have pubtime yet. #16369 #16372
- Cargo now parses TOML v1.1 for manifests and configuration files. Note that using these features in Cargo.toml will raise your development MSRV, but the published manifest remains compatible with older parsers. #16415
- Make
CARGO_BIN_EXE_<crate>available at runtime
<a id="1.94.0-Compatibility-Notes"></a>
Compatibility Notes
- Forbid freely casting lifetime bounds of
dyn-types - Make closure capturing have consistent and correct behaviour around patterns Some finer details of how precise closure captures get affected by pattern matching have been changed. In some cases, this can cause a non-move closure that was previously capturing an entire variable by move, to now capture only part of that variable by move, and other parts by borrow. This can cause the borrow checker to complain where it previously didn't, or cause
Dropto run at a different point in time. - [Standard library macros are now imported via prelude, not via injected
#[macro_use]](https://github.com/rust-lang/rust/pull/139493) This will raise an error if macros of the same name are glob imported. For example if a crate defines their ownmatchesmacro and then glob imports that, it's now ambiguous whether the custom or standard librarymatchesis meant and an explicit import of the name is required to resolve the ambiguity. One exception iscore::panicandstd::panic, if their import is ambiguous a new warning (ambiguous_panic_imports) is raised. This may raise a new warning (ambiguous_panic_imports) on#![no_std]code glob importing the std crate. Bothcore::panic!andstd::panic!are then in scope and which is used is ambiguous. - Don't strip shebang in expression-context
include!(…)s This can cause previously working includes to no longer compile if they included files which started with a shebang. - Ambiguous glob reexports are now also visible cross-crate This unifies behavior between local and cross-crate errors on these exports, which may introduce new ambiguity errors.
- Don't normalize where-clauses before checking well-formedness
- Introduce a future compatibility warning on codegen attributes on body-free trait methods These attributes currently have no effect in this position.
- On Windows
std::time::SystemTime::checked_sub_durationwill returnNonefor times before the Windows epoch (1/1/1601) - Lifetime identifiers such as
'aare now NFC normalized. - Overhaul filename handling for cross-compiler consistency Any paths emitted by compiler now always respect the relative-ness of the paths and
--remap-path-prefixgiven originally. One side-effect of this change is that paths emitted for local crates in Cargo (path dependencies and workspace members) are no longer absolute but relative when emitted as part of a diagnostic in a downstream crate.
<a id="1.94.0-Internal-Changes"></a>
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.
- Switch to
annotate-snippetsfor error emission This should preserve mostly the same outputs in rustc error messages.
1.94.1 (Mar 26, 2026)
<a id="1.94.1"></a>
- Fix
std::thread::spawnon wasm32-wasip1-threads - Remove new methods added to
std::os::windows::fs::OpenOptionsExtThe new methods were unstable, but the trait itself is not sealed and so cannot be extended with non-default methods. - Clippy: fix ICE in
match_same_arms - Cargo: update tar to 0.4.45 This resolves CVE-2026-33055 and CVE-2026-33056. Users of crates.io are not affected. See blog for more details.
Release notes from the Rust project's RELEASES.md (MIT or Apache-2.0); summaries above are ours.
Up next
Next releaseRust 1.95Released Apr 16, 2026.Read it next →Also worth your time
Did this answer your question?