Migrating to Rust Language 1.95.0
Version 1.95.0 introduces 2 breaking changes. This guide details how to update your code.
Released: 4/16/2026
⚠️ Check Your Code
If you use any of these symbols, you need to read this guide:
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_fnControlFlowBreaking Changes
●Issue #1
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.
●Issue #2
Importing `$crate` without renaming, i.e. `use $crate::{self};`, is no longer permitted due to stricter error checking for `self` imports.
Migration Steps
- 1If 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.
- 2If you used `use $crate::{self};`, change it to explicitly name the item being imported or use a different import style.
Release 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.
Need More Details?
View the full release notes and all changes for Rust Language 1.95.0.
View Full Changelog