Rust 1.95 Released with New Match Guards and Stable API Additions

Rust 1.95 has been released, introducing support for if let guards within match expressions. This builds on the let chain feature added in Rust 1.88, allowing developers to perform additional conditional pattern checks directly inside match arms.
The Rust team notes that patterns used in if let guards are not currently considered during the compiler’s exhaustiveness checking, similar to standard if guards.
Another notable addition is the cfg_select! macro. It acts as a compile-time match over configuration predicates, serving a role similar to the popular cfg-if crate, but with a different syntax. This makes it easier to choose implementations or values based on the target platform or build configuration.
Rust 1.95 also significantly expands the stable API surface. Newly stabilized features include improvements to MaybeUninit, Cell, atomic update and try-update methods, the core::range module, Vec::push_mut, Vec::insert_mut, insertion helpers for VecDeque, mutation helpers for LinkedList, and several Layout methods.
One breaking change affects custom targets. Stable support for passing a custom JSON target specification to rustc has been removed. However, this is not expected to impact most users, as building the standard library for custom targets already requires nightly features.
Beyond language and compiler updates, the release also includes various improvements across Rust tooling, including Cargo and Clippy. Overall, Rust 1.95 is a broad update that delivers both new features and ongoing refinements rather than focusing on a single major change.
For a detailed list of changes, refer to the official announcement.
Share this:
- Share on Facebook (Opens in new window) Facebook
- Share on X (Opens in new window) X
- Share on Bluesky (Opens in new window) Bluesky
- Share on LinkedIn (Opens in new window) LinkedIn
- Share on Reddit (Opens in new window) Reddit
- Share on Threads (Opens in new window) Threads
- Print (Opens in new window) Print
- Share on Mastodon (Opens in new window) Mastodon








