Rust versions / 1.72
Rust release · Aug 24, 2023
Rust 1.72: what's new, what was stabilized
Short answerRust 1.72 was released on Aug 24, 2023: 1 language stabilization (Stabilize inline asm for LoongArch64); 7 newly stable APIs (impl<T: Send> Sync for mpsc::Sender<T>, impl TryFrom<&OsStr> for &str, String::leak, CStr::from_bytes_with_nul, ...); 3 compatibility notes that can affect existing code. Point release: 1.72.1 (Sep 19, 2023).
← Rust 1.71All versionsRust 1.73 →
Language features stabilized
- Stabilize inline asm for LoongArch64
7 APIs stabilized
impl<T: Send> Sync for mpsc::Sender<T>, impl TryFrom<&OsStr> for &str, String::leak, CStr::from_bytes_with_nul, CStr::to_bytes, CStr::to_bytes_with_nul, CStr::to_str
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:
- Alter
DisplayforIpv6Addrfor IPv4-compatible addresses - Cargo changed feature name validation check to a hard error. The warning was
- Demoted
mips*-unknown-linux-gnu*targets from host tier 2 to target tier 3 support.
Use it
rustup update stable # get the newest release
rustup install 1.72 # or exactly this one
rustup override set 1.72 # pin a project to itTo require at least this version from users of your crate, set rust-version = "1.72" 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
- Replace const eval limit by a lint and add an exponential backoff warning
- [expand: Change how
#![cfg(FALSE)]behaves on crate root](https://github.com/rust-lang/rust/pull/110141/) - Stabilize inline asm for LoongArch64
- Uplift
clippy::undropped_manually_dropslint - Uplift
clippy::invalid_utf8_in_uncheckedlint asinvalid_from_utf8_uncheckedandinvalid_from_utf8 - Uplift
clippy::cast_ref_to_mutlint asinvalid_reference_casting - Uplift
clippy::cmp_nanlint asinvalid_nan_comparisons - resolve: Remove artificial import ambiguity errors
- Don't require associated types with Self: Sized bounds in
dyn Traitobjects
<a id="1.72.0-Compiler"></a>
Compiler
- Remember names of
cfg-ed out items to mention them in diagnostics - Support for native WASM exceptions
- Add support for NetBSD/aarch64-be (big-endian arm64).
- Write to stdout if
-is given as output file - Force all native libraries to be statically linked when linking a static binary
- Add Tier 3 support for
loongarch64-unknown-none* - Prevent
.eh_framefrom being emitted for-C panic=abort - Support 128-bit enum variant in debuginfo codegen
- compiler: update solaris/illumos to enable tsan support.
Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support.
<a id="1.72.0-Libraries"></a>
Libraries
- Document memory orderings of
thread::{park, unpark} - io: soften ‘at most one write attempt’ requirement in io::Write::write
- Specify behavior of HashSet::insert
- Relax implicit
T: Sizedbounds onBufReader<T>,BufWriter<T>andLineWriter<T> - Update runtime guarantee for
select_nth_unstable - Return
Okon kill if process has already exited - Implement PartialOrd for
Vecs over different allocators - Use 128 bits for TypeId hash
- Don't drain-on-drop in DrainFilter impls of various collections.
- Make
{Arc,Rc,Weak}::ptr_eqignore pointer metadata
<a id="1.72.0-Rustdoc"></a>
Rustdoc
- Allow whitespace as path separator like double colon
- Add search result item types after their name
- [Search for slices and arrays by type with
[]](https://github.com/rust-lang/rust/pull/111958/) - Clean up type unification and "unboxing"
<a id="1.72.0-Stabilized-APIs"></a>
Stabilized APIs
These APIs are now stable in const contexts:
<a id="1.72.0-Cargo"></a>
Cargo
- Enable
-Zdoctest-in-workspaceby default. When running each documentation test, the working directory is set to the root directory of the package the test belongs to. docs #12221 #12288 - Add support of the "default" keyword to reset previously set
build.jobsparallelism back to the default. #12222
<a id="1.72.0-Compatibility-Notes"></a>
Compatibility Notes
- Alter
DisplayforIpv6Addrfor IPv4-compatible addresses - Cargo changed feature name validation check to a hard error. The warning was added in Rust 1.49. These extended characters aren't allowed on crates.io, so this should only impact users of other registries, or people who don't publish to a registry. #12291
- Demoted
mips*-unknown-linux-gnu*targets from host tier 2 to target tier 3 support.
1.72.1 (Sep 19, 2023)
- Adjust codegen change to improve LLVM codegen
- rustdoc: Fix self ty params in objects with lifetimes
- Fix regression in compile times
- Resolve some ICE regressions in the compiler:
- #115215
- #115559
Release notes from the Rust project's RELEASES.md (MIT or Apache-2.0); summaries above are ours.
Up next
Next releaseRust 1.73Released Oct 5, 2023.Read it next →Also worth your time
Did this answer your question?