Rust versions / 1.77
Rust release · Mar 21, 2024
Rust 1.77: what's new, what was stabilized
Short answerRust 1.77 was released on Mar 21, 2024: 2 language stabilizations (Stabilize C-string literals.); 20 newly stable APIs (array::each_ref, array::each_mut, core::net, f32::round_ties_even, ...). Point releases: 1.77.1 (Mar 28, 2024), 1.77.2 (Apr 9, 2024).
← Rust 1.76All versionsRust 1.78 →
Language features stabilized
- Stabilize C-string literals.
- Stabilize THIR unsafeck.
20 APIs stabilized
array::each_ref, array::each_mut, core::net, f32::round_ties_even, f64::round_ties_even, mem::offset_of!, slice::first_chunk, slice::first_chunk_mut, slice::split_first_chunk, slice::split_first_chunk_mut, slice::last_chunk, slice::last_chunk_mut, slice::split_last_chunk, slice::split_last_chunk_mut, slice::chunk_by, slice::chunk_by_mut, Bound::map, File::create_new, Mutex::clear_poison, RwLock::clear_poison
Can it break my build?
No compatibility notes were listed for this release.
Use it
rustup update stable # get the newest release
rustup install 1.77 # or exactly this one
rustup override set 1.77 # pin a project to itTo require at least this version from users of your crate, set rust-version = "1.77" 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
- Reveal opaque types within the defining body for exhaustiveness checking.
- Stabilize C-string literals.
- Stabilize THIR unsafeck.
- Add lint
static_mut_refsto warn on references to mutable statics. - Support async recursive calls (as long as they have indirection).
- Undeprecate lint
unstable_featuresand make use of it in the compiler. - Make inductive cycles in coherence ambiguous always.
- Get rid of type-driven traversal in const-eval interning, only as a future compatibility lint for now.
- Deny braced macro invocations in let-else.
<a id="1.77.0-Compiler"></a>
Compiler
- Include lint
soft_unstablein future breakage reports. - Make
i128andu12816-byte aligned on x86-based targets. - Use
--verbosein diagnostic output. - Improve spacing between printed tokens.
- Merge the
unused_tuple_struct_fieldslint intodead_code. - Error on incorrect implied bounds in well-formedness check, with a temporary exception for Bevy.
- Fix coverage instrumentation/reports for non-ASCII source code.
- Fix
fn/constitems implied bounds and well-formedness check. - Promote
riscv32{im|imafc}-unknown-none-elftargets to tier 2. - Add several new tier 3 targets:
aarch64-unknown-illumoshexagon-unknown-none-elfriscv32imafc-esp-espidfriscv32im-risc0-zkvm-elf
Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support.
<a id="1.77.0-Libraries"></a>
Libraries
- [Implement
From<&[T; N]>forCow<[T]>.](https://github.com/rust-lang/rust/pull/113489/) - Remove special-case handling of
vec.split_off(0).
<a id="1.77.0-Stabilized-APIs"></a>
Stabilized APIs
array::each_refarray::each_mutcore::netf32::round_ties_evenf64::round_ties_evenmem::offset_of!slice::first_chunkslice::first_chunk_mutslice::split_first_chunkslice::split_first_chunk_mutslice::last_chunkslice::last_chunk_mutslice::split_last_chunkslice::split_last_chunk_mutslice::chunk_byslice::chunk_by_mutBound::mapFile::create_newMutex::clear_poisonRwLock::clear_poison
<a id="1.77.0-Cargo"></a>
Cargo
- Extend the build directive syntax with
cargo::. - Stabilize metadata
idformat asPackageIDSpec. - Pull out
cargo-util-schemasas a crate. - Strip all debuginfo when debuginfo is not requested.
- Inherit jobserver from env for all kinds of runners.
- Deprecate rustc plugin support in cargo.
<a id="1.77.0-Rustdoc"></a>
Rustdoc
- Allows links in markdown headings.
- Search for tuples and unit by type with
(). - Clean up the source sidebar's hide button.
- Prevent JS injection from
localStorage.
<a id="1.77.0-Misc"></a>
Misc
<a id="1.77.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.
1.77.1 (Mar 28, 2024)
<a id="1.77.1"></a>
- Revert stripping debuginfo by default for Windows This fixes a regression in 1.77 by reverting to the previous default. Platforms other than Windows are not affected.
- Internal: Fix heading anchor rendering in doc pages
1.77.2 (Apr 9, 2024)
<a id="1.77.2"></a>
Release notes from the Rust project's RELEASES.md (MIT or Apache-2.0); summaries above are ours.
Up next
Next releaseRust 1.78Released May 2, 2024.Read it next →Also worth your time
Did this answer your question?