Rust released version 1.95.0 on April 16, adding language conveniences for platform-specific code and conditional pattern matching. The release announcement also flags a change that deserves attention from maintainers of custom compilation targets.
Configuration becomes an ordered choice
The new cfg_select! macro selects the first branch whose configuration condition is true. Match expressions also gain if let guards, bringing pattern-based conditions into individual arms. These guards do not contribute to the compiler’s exhaustiveness calculation.
That combination suggests two focused review tasks. For platform selection, make branch precedence obvious: an operating-system condition and a pointer-width condition can overlap. For guarded matches, retain a clear fallback instead of treating a successful inner pattern as complete coverage. A shorter expression is useful only when its behavior remains easy to inspect.
Check the toolchain boundary
The release removes stable support for passing custom JSON target specifications to the compiler. Rust’s announcement explains that building the standard library for such targets already depended on nightly features.
For an embedded or unusual-platform project, the practical question is which parts of its build were actually stable. Inventory the compiler invocation, standard-library build step, and target file together before changing the pinned version. A project using only a supported built-in target has a different migration surface from one maintaining its own target description.
Library authors adopting the new syntax should also consider their minimum compiler policy. Run the oldest supported compiler in a separate check so an incidental syntax cleanup does not silently raise downstream requirements.
- Announcing Rust 1.95.0
Rust · Apr 16, 2026
See the original announcement for availability and release details.