Rust 1.95 adds cfg_select, match guards, and wider platform support
cfg_select! lands in stable Rust, match arms gain if-let guards, and seven platform targets move up as 1.95.0 sharpens cross-platform work.

Rust 1.95.0 landed on April 16, 2026, with the kind of changes that alter day-to-day code more than release-note buzz would suggest. The headline addition is cfg_select!, a new macro that behaves like a compile-time match over configuration predicates, expanding the right-hand side of the first arm whose condition is true. Paired with if-let guards in match expressions, the release gives Rust developers cleaner ways to express platform splits and value-dependent branching without piling on nested conditionals.
That matters because cfg_select! fills a niche many teams have been covering with cfg-if. The feature grew out of a December 2024 Rust Internals discussion that described a compile-time cfg-based if-then-else chain, and the tracking issue in rust-lang/rust began life under the name cfg_match before the final rename to cfg_select. In practice, the macro means one set of branches can be written once and selected at compile time, instead of repeating the same #[cfg] conditions across multiple items. For codebases with several operating-system or architecture targets, that is less repetition and fewer opportunities for drift.
The new match guards are just as practical. Rust 1.95 brings if-let guards into match arms, extending a pattern-matching style that already appeared in let chains. The compiler still does not count those guarded patterns as part of exhaustiveness checking, so the feature fits into familiar match-guard semantics rather than rewriting them. For everyday code, that makes it easier to bind a value only when a secondary pattern check succeeds, while keeping the match itself readable.
Rust 1.95 also stabilized a cluster of APIs that will show up in ordinary library code and lower-level systems work. Vec::push_mut, VecDeque::push_front_mut, LinkedList::push_back_mut, and AtomicBool::update are now stable, along with several MaybeUninit, Cell, and atomic accessors. The release also pushed some APIs into const contexts, including fmt::from_fn, ControlFlow::is_break, and ControlFlow::is_continue, which helps teams move more logic into compile time instead of runtime.
The platform story is broad enough to matter on its own. powerpc64-unknown-linux-musl moved to Tier 2 with host tools, and six Apple targets advanced to Tier 2 as well: aarch64-apple-tvos, aarch64-apple-tvos-sim, aarch64-apple-watchos, aarch64-apple-watchos-sim, aarch64-apple-visionos, and aarch64-apple-visionos-sim. That is seven promoted targets in one release, a concrete expansion for teams building across Apple’s newer device families and older PowerPC deployments.
Rust 1.95 also tightened a few edges that macro authors and toolchain users will notice. rustdoc now has a setting to hide deprecated items in search results and ranks unstable items lower. Importing $crate without renaming, such as use $crate::{self};, is no longer permitted. And stable rustc no longer accepts a custom target specification. For anyone shipping cross-platform Rust this month, 1.95 is not a cosmetic update. It is a release that removes friction where Rust code is most likely to grow.
Know something we missed? Have a correction or additional information?
Submit a Tip

