← Back to all releases

Rust 1.73.0

Released on October 5, 2023

What's Changed

Full Changelog

Language

--------

- Uplift clippy::fn_null_check lint as useless_ptr_null_checks.

- Make noop_method_call warn by default.

- Support interpolated block for try and async in macros.

- Make unconditional_recursion lint detect recursive drops.

- Future compatibility warning for some impls being incorrectly considered not overlapping.

- The invalid_reference_casting lint is now deny-by-default (instead of allow-by-default)

Compiler

--------

- Write version information in a .comment section 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-teeos

- csky-unknown-linux-gnuabiv2

- riscv64-linux-android

- riscv64gc-unknown-hermit

- x86_64-unikraft-linux-musl

- x86_64-unknown-linux-ohos

- Add wasm32-wasi-preview1-threads as a tier 2 target.

Refer to Rust's [platform support page][platform-support-doc]

for more information on Rust's tiered platform support.

Libraries

---------

- Add Read, Write and Seek impls for Arc.

- Merge functionality of io::Sink into io::Empty.

- Implement RefUnwindSafe for Backtrace

- Make ExitStatus implement Default

- impl SliceIndex for (Bound, Bound)

- Change default panic handler message format.

- Cleaner assert_eq! & assert_ne! panic messages.

- Correct the (deprecated) Android stat struct definitions.

Stabilized APIs

---------------

- Unsigned {integer}::div_ceil

- Unsigned {integer}::next_multiple_of

- Unsigned {integer}::checked_next_multiple_of

- std::ffi::FromBytesUntilNulError

- std::os::unix::fs::chown

- std::os::unix::fs::fchown

- std::os::unix::fs::lchown

- LocalKey::>::get

- LocalKey::>::set

- LocalKey::>::take

- LocalKey::>::replace

- LocalKey::>::with_borrow

- LocalKey::>::with_borrow_mut

- LocalKey::>::set

- LocalKey::>::take

- LocalKey::>::replace

These APIs are now stable in const contexts:

- rc::Weak::new

- sync::Weak::new

- NonNull::as_ref

Cargo

-----

- Bail out an error when using cargo:: in custom build script.

Misc

----

Compatibility Notes

-------------------

- Update the minimum external LLVM to 15.

- Check for non-defining uses of return position impl Trait.

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_apfloat with the new version of the crate.

- Update to LLVM 17.

- Add internal_features lint for internal unstable features.

- Mention style for new syntax in tracking issue template.