Rust 1.95 Released: New Macro Smarter Match Guards and a Breaking Change for Embedded Developers
Rust 1.95 Released: New Macro Smarter Match Guards and a Breaking Change for Embedded Developers
- 60% of MD5 Password Hashes Can Be Cracked in Under an Hour with a Single GPU
- Dirty Frag: Root Access on Every Major Linux Distribution — No Patch, No Warning
- Ubuntu 26.04 LTS (Resolute Raccoon): The Most Ambitious Ubuntu LTS in a Decade
- Proton Mail: Data Transferred to FBI Again!
- How Close Are Quantum Computers to Breaking RSA-2048?
- How to Prevent Ransomware Infection Risks?
- What is the best alternative to Microsoft Office?
Rust 1.95 Released: New Macro Smarter Match Guards and a Breaking Change for Embedded Developers
April 16, 2026 — The Rust team has announced the release of Rust 1.95.0, the latest stable version of the popular systems programming language focused on reliability and performance.
Developers can upgrade immediately by running rustup update stable.
A Built-In Replacement for cfg-if: The cfg_select! Macro
One of the most headline-worthy additions in this release is a new standard library macro. Rust 1.95 introduces cfg_select!, which acts roughly like a compile-time match on configuration predicates (cfgs). It fulfills the same purpose as the widely used cfg-if crate, though with a different syntax — expanding to the first arm whose configuration condition evaluates to true.
This means developers can now write platform-specific code branches — such as targeting Unix vs. Windows, or 32-bit vs. 64-bit architectures — directly in the standard library, without needing an external dependency.
If-Let Guards Come to Match Expressions
Another notable language improvement is the addition of if let guards within match expressions. This feature builds on the let chain functionality introduced in Rust 1.88, enabling additional conditional pattern checks directly within match arms.
In practice, this allows both the matched variable and the result of a fallible operation to be available in the same match arm body. The compiler currently does not factor patterns in if let guards into exhaustiveness evaluation, consistent with how ordinary if guards behave.
Expanded Stable API Surface
Rust 1.95 significantly expands the stable API surface. Among the highlights from the official release notes, newly stabilized APIs include conversion traits for MaybeUninit arrays, update and try_update methods on atomic types (AtomicPtr, AtomicBool, AtomicIsize, AtomicUsize), Vec::push_mut and Vec::insert_mut, new VecDeque and LinkedList mutation methods, core::hint::cold_path for branch-prediction hints, and a new core::range module with RangeInclusive and RangeInclusiveIter types.
Breaking Change: Custom JSON Target Specs Removed from Stable
Embedded developers should pay close attention to one significant removal. Rust 1.95 removes stable support for passing a custom JSON target specification to rustc. This change is not expected to affect users on a fully stable toolchain, since building the standard library for custom targets already required nightly-only features. The Rust project is tracking use cases on a dedicated GitHub issue as it evaluates whether a future stable path will be provided.
Linux Kernel Readiness
The Linux kernel had already been preparing for Rust 1.95 ahead of the release, reflecting the growing adoption of Rust in low-level systems programming and the kernel’s ongoing integration of Rust as a supported language for kernel components.
What’s Next
The next release, Rust 1.96.0, is currently in beta and is scheduled for May 28, 2026. Developers who want to help catch bugs early can switch to the beta or nightly channel via rustup default beta or rustup default nightly.
The full release announcement and detailed notes are available on the official Rust Blog.
Sources: Rust Blog (blog.rust-lang.org), Phoronix, Linuxiac, LinuxCompatible
