1.95.0
Breaking Changes📦 rust-languageView on GitHub →
⚠ 2 breaking✨ 17 features🐛 2 fixes⚡ 2 deprecations🔧 22 symbols
Summary
This release stabilizes several language features like `if let` guards and inline assembly for PowerPC, stabilizes numerous APIs including atomic update methods and pointer unchecked conversions, and promotes several Apple targets to Tier 2 support.
⚠️ Breaking Changes
- Const blocks are no longer evaluated to determine if expressions involving fallible operations can implicitly be constant-promoted. Expressions whose ability to implicitly be promoted would depend on the result of a const block are no longer implicitly promoted. This might cause previously implicitly promoted expressions involving fallible operations within const blocks to fail compilation if they rely on that implicit promotion.
- Importing `$crate` without renaming, i.e. `use $crate::{self};`, is no longer permitted due to stricter error checking for `self` imports.
Migration Steps
- If you relied on implicit constant promotion for expressions involving fallible operations inside const blocks, you may need to explicitly handle the fallibility outside the const block or ensure the operation is provably constant.
- If you used `use $crate::{self};`, change it to explicitly name the item being imported or use a different import style.
✨ New Features
- Stabilized `if let` guards on match arms.
- Support importing path-segment keywords with renaming.
- Stabilized inline assembly for PowerPC and PowerPC64.
- Stabilized `--remap-path-scope` for controlling the scoping of how paths get remapped in the resulting binary.
- Stabilized `MaybeUninit<[T; N]>: From<[MaybeUninit<T>; N]>` and related array/slice conversions for `MaybeUninit`.
- Stabilized array conversions for `Cell<[T; N]>` and `Cell<[T]>`.
- Stabilized `bool: TryFrom<{integer}>`.
- Stabilized `AtomicPtr::update` and `AtomicPtr::try_update`.
- Stabilized `AtomicBool::update` and `AtomicBool::try_update`.
- Stabilized `AtomicIsize::update` and `AtomicIsize::try_update` (listed as `AtomicIn::update`/`try_update`).
- Stabilized `AtomicUsize::update` and `AtomicUsize::try_update` (listed as `AtomicUn::update`/`try_update`).
- Stabilized `cfg_select!` macro.
- Stabilized `core::range` module, including `RangeInclusive` and `RangeInclusiveIter`.
- Stabilized `core::hint::cold_path`.
- Stabilized unchecked pointer conversion methods: `<*const T>::as_ref_unchecked`, `<*mut T>::as_ref_unchecked`, and `<*mut T>::as_mut_unchecked`.
- Stabilized `fmt::from_fn` in const contexts.
- Stabilized `ControlFlow::is_break` and `ControlFlow::is_continue` in const contexts.
🐛 Bug Fixes
- Made const-eval more consistent in the behavior of padding during typed copies.
- Speed up `str::contains` on aarch64 targets with `neon` target feature enabled by default.
Affected Symbols
irrefutable_let_patterns (lint)Eq::assert_receiver_is_total_eqthread::scopestr::containsMaybeUninit<[T; N]>[MaybeUninit<T>; N]Cell<[T; N]>Cell<[T]>boolAtomicPtrAtomicBoolAtomicIsizeAtomicUsizecfg_select!core::rangecore::range::RangeInclusivecore::range::RangeInclusiveItercore::hint::cold_path*const T*mut Tfmt::from_fnControlFlow
⚡ Deprecations
- The lint `irrefutable_let_patterns` no longer lints on let chains.
- The trait method `Eq::assert_receiver_is_total_eq` is deprecated and future compatibility warnings are emitted on manual impls.