Rust versions / 1.73
Rust release · Oct 5, 2023
Rust 1.73: what's new, what was stabilized
Short answerRust 1.73 was released on Oct 5, 2023: 19 newly stable APIs ({integer}::div_ceil, {integer}::next_multiple_of, {integer}::checked_next_multiple_of, std::ffi::FromBytesUntilNulError, ...); 2 compatibility notes that can affect existing code.
← Rust 1.72All versionsRust 1.74 →
19 APIs stabilized
{integer}::div_ceil, {integer}::next_multiple_of, {integer}::checked_next_multiple_of, std::ffi::FromBytesUntilNulError, std::os::unix::fs::chown, std::os::unix::fs::fchown, std::os::unix::fs::lchown, LocalKey::<Cell<T>>::get, LocalKey::<Cell<T>>::set, LocalKey::<Cell<T>>::take, LocalKey::<Cell<T>>::replace, LocalKey::<RefCell<T>>::with_borrow, LocalKey::<RefCell<T>>::with_borrow_mut, LocalKey::<RefCell<T>>::set, LocalKey::<RefCell<T>>::take, LocalKey::<RefCell<T>>::replace, rc::Weak::new, sync::Weak::new, NonNull::as_ref
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:
Use it
rustup update stable # get the newest release
rustup install 1.73 # or exactly this one
rustup override set 1.73 # pin a project to itTo require at least this version from users of your crate, set rust-version = "1.73" 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
- Uplift
clippy::fn_null_checklint asuseless_ptr_null_checks. - Make
noop_method_callwarn by default. - Support interpolated block for
tryandasyncin macros. - Make
unconditional_recursionlint detect recursive drops. - Future compatibility warning for some impls being incorrectly considered not overlapping.
- The
invalid_reference_castinglint is now **deny-by-default** (instead of allow-by-default)
<a id="1.73.0-Compiler"></a>
Compiler
- Write version information in a
.commentsection like GCC/Clang. - Add documentation on v0 symbol mangling.
- Stabilize
extern "thiscall"and"thiscall-unwind"ABIs. - Only check outlives goals on impl compared to trait.
- Infer type in irrefutable slice patterns with fixed length as array.
- Discard default auto trait impls if explicit ones exist.
- Add several new tier 3 targets:
aarch64-unknown-teeoscsky-unknown-linux-gnuabiv2riscv64-linux-androidriscv64gc-unknown-hermitx86_64-unikraft-linux-muslx86_64-unknown-linux-ohos- Add
wasm32-wasi-preview1-threadsas a tier 2 target.
Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support.
<a id="1.73.0-Libraries"></a>
Libraries
- Add
Read,WriteandSeekimpls forArc<File>. - Merge functionality of
io::Sinkintoio::Empty. - Implement
RefUnwindSafeforBacktrace - Make
ExitStatusimplementDefault impl SliceIndex<str> for (Bound<usize>, Bound<usize>)- Change default panic handler message format.
- Cleaner
assert_eq!&assert_ne!panic messages. - Correct the (deprecated) Android
statstruct definitions.
<a id="1.73.0-Stabilized-APIs"></a>
Stabilized APIs
- Unsigned
{integer}::div_ceil - Unsigned
{integer}::next_multiple_of - Unsigned
{integer}::checked_next_multiple_of std::ffi::FromBytesUntilNulErrorstd::os::unix::fs::chownstd::os::unix::fs::fchownstd::os::unix::fs::lchownLocalKey::<Cell<T>>::getLocalKey::<Cell<T>>::setLocalKey::<Cell<T>>::takeLocalKey::<Cell<T>>::replaceLocalKey::<RefCell<T>>::with_borrowLocalKey::<RefCell<T>>::with_borrow_mutLocalKey::<RefCell<T>>::setLocalKey::<RefCell<T>>::takeLocalKey::<RefCell<T>>::replace
These APIs are now stable in const contexts:
<a id="1.73.0-Cargo"></a>
Cargo
<a id="1.73.0-Misc"></a>
Misc
<a id="1.73.0-Compatibility-Notes"></a>
Compatibility Notes
<a id="1.73.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.
- Remove LLVM pointee types, supporting only opaque pointers.
- Port PGO/LTO/BOLT optimized build pipeline to Rust.
- Replace in-tree
rustc_apfloatwith the new version of the crate. - Update to LLVM 17.
- Add
internal_featureslint for internal unstable features. - Mention style for new syntax in tracking issue template.
Release notes from the Rust project's RELEASES.md (MIT or Apache-2.0); summaries above are ours.
Up next
Next releaseRust 1.74Released Nov 16, 2023.Read it next →Also worth your time
Did this answer your question?