1.60.0 #
- Released on: 7 April, 2022
- Branched from master on: 18 February, 2022
Language #
- Stabilize
#[cfg(panic = "...")]for either"unwind"or"abort". - Stabilize
#[cfg(target_has_atomic = "...")]for each integer size and"ptr".
Compiler #
- Enable combining
+crt-staticandrelocation-model=piconx86_64-unknown-linux-gnu - Fixes wrong
unreachable_publints on nested and glob public reexport - Stabilize
-Z instrument-coverageas-C instrument-coverage - Stabilize
-Z print-link-argsas--print link-args - Add new Tier 3 target
mips64-openwrt-linux-musl* - Add new Tier 3 target
armv7-unknown-linux-uclibceabi(softfloat)* - Fix invalid removal of newlines from doc comments
- Add kernel target for RustyHermit
- Deny mixing bin crate type with lib crate types
- Make rustc use
RUST_BACKTRACE=fullby default - Upgrade to LLVM 14
* Refer to Rust’s [platform support page][platform-support-doc] for more information on Rust’s tiered platform support.
Libraries #
- Guarantee call order for
sort_by_cached_key - Improve
Duration::try_from_secs_f32/f64accuracy by directly processing exponent and mantissa - Make
Instant::{duration_since, elapsed, sub}saturating - Remove non-monotonic clocks workarounds in
Instant::now - Make
BuildHasherDefault,iter::Emptyandfuture::Pendingcovariant
Stabilized APIs #
Arc::new_cyclicRc::new_cyclicslice::EscapeAscii<[u8]>::escape_asciiu8::escape_asciiVec::spare_capacity_mutMaybeUninit::assume_init_dropMaybeUninit::assume_init_readi8::abs_diffi16::abs_diffi32::abs_diffi64::abs_diffi128::abs_diffisize::abs_diffu8::abs_diffu16::abs_diffu32::abs_diffu64::abs_diffu128::abs_diffusize::abs_diffDisplay for io::ErrorKindFrom<u8> for ExitCodeNot for !(the “never” type)- Op
Assign<$t> for Wrapping<$t> arch::is_aarch64_feature_detected!
Cargo #
- Port cargo from
toml-rstotoml_edit - Stabilize
-Ztimingsas--timings - Stabilize namespaced and weak dependency features.
- Accept more
cargo:rustc-link-arg-*types from build script output. - cargo-new should not add ignore rule on Cargo.lock inside subdirs
Misc #
- Ship docs on Tier 2 platforms by reusing the closest Tier 1 platform docs
- Drop rustc-docs from complete profile
- bootstrap: tidy up flag handling for llvm build
Compatibility Notes #
- Remove compiler-rt linking hack on Android
- Mitigations for platforms with non-monotonic clocks have been removed from
Instant::now. On platforms that don’t provide monotonic clocks, an instant is not guaranteed to be greater than an earlier instant anymore. Instant::{duration_since, elapsed, sub}do not panic anymore on underflow, saturating to0instead. In the real world the panic happened mostly on platforms with buggy monotonic clock implementations rather than catching programming errors like reversing the start and end times. Such programming errors will now results in0rather than a panic.- In a future release we’re planning to increase the baseline requirements for the Linux kernel to version 3.2, and for glibc to version 2.17. We’d love your feedback in PR #95026.
Internal Changes #
These changes provide no direct user facing benefits, but represent significant improvements to the internals and overall performance of rustc and related tools.