{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreiajd2pzit6twer4ek5cbfc25zx467m4ofh3j6i4couipo7ikdfa3u",
    "uri": "at://did:plc:lujatorbzcq2chhxnvjgc464/app.bsky.feed.post/3mjnszetyiqi2"
  },
  "path": "/2026/04/16/Rust-1.95.0/",
  "publishedAt": "2026-04-16T00:00:00.000Z",
  "site": "https://blog.rust-lang.org",
  "tags": [
    "get rustup",
    "detailed release notes for 1.95.0",
    "report",
    "cfg_select!",
    "cfg-if",
    "let chains",
    "MaybeUninit<[T; N]>: From<[MaybeUninit<T>; N]>",
    "MaybeUninit<[T; N]>: AsRef<[MaybeUninit<T>; N]>",
    "MaybeUninit<[T; N]>: AsRef<[MaybeUninit<T>]>",
    "MaybeUninit<[T; N]>: AsMut<[MaybeUninit<T>; N]>",
    "MaybeUninit<[T; N]>: AsMut<[MaybeUninit<T>]>",
    "[MaybeUninit<T>; N]: From<MaybeUninit<[T; N]>>",
    "Cell<[T; N]>: AsRef<[Cell<T>; N]>",
    "Cell<[T; N]>: AsRef<[Cell<T>]>",
    "Cell<[T]>: AsRef<[Cell<T>]>",
    "bool: TryFrom<{integer}>",
    "AtomicPtr::update",
    "AtomicPtr::try_update",
    "AtomicBool::update",
    "AtomicBool::try_update",
    "AtomicIn::update",
    "AtomicIn::try_update",
    "AtomicUn::update",
    "AtomicUn::try_update",
    "mod core::range",
    "core::range::RangeInclusive",
    "core::range::RangeInclusiveIter",
    "core::hint::cold_path",
    "<*const T>::as_ref_unchecked",
    "<*mut T>::as_ref_unchecked",
    "<*mut T>::as_mut_unchecked",
    "Vec::push_mut",
    "Vec::insert_mut",
    "VecDeque::push_front_mut",
    "VecDeque::push_back_mut",
    "VecDeque::insert_mut",
    "LinkedList::push_front_mut",
    "LinkedList::push_back_mut",
    "Layout::dangling_ptr",
    "Layout::repeat",
    "Layout::repeat_packed",
    "Layout::extend_packed",
    "fmt::from_fn",
    "ControlFlow::is_break",
    "ControlFlow::is_continue",
    "tracking issue",
    "Rust",
    "Cargo",
    "Clippy",
    "Thanks!"
  ],
  "textContent": "The Rust team is happy to announce a new version of Rust, 1.95.0. Rust is a programming language empowering everyone to build reliable and efficient software.\n\nIf you have a previous version of Rust installed via `rustup`, you can get 1.95.0 with:\n\n\n    $ rustup update stable\n\nIf you don't have it already, you can get rustup from the appropriate page on our website, and check out the detailed release notes for 1.95.0.\n\nIf you'd like to help us out by testing future releases, you might consider updating locally to use the beta channel (`rustup default beta`) or the nightly channel (`rustup default nightly`). Please report any bugs you might come across!\n\n##  What's in 1.95.0 stable\n\n###  `cfg_select!`\n\nRust 1.95 introduces a cfg_select! macro that acts roughly similar to a compile-time `match` on `cfg`s. This fulfills the same purpose as the popular cfg-if crate, although with a different syntax. `cfg_select!` expands to the right-hand side of the first arm whose configuration predicate evaluates to `true`. Some examples:\n\n\n    cfg_select! {  unix => {  fn foo() { /* unix specific functionality */ }  }  target_pointer_width = \"32\" => {  fn foo() { /* non-unix, 32-bit functionality */ }  }  _ => {  fn foo() { /* fallback implementation */ }  } }  let is_windows_str = cfg_select! {  windows => \"windows\",  _ => \"not windows\", };\n\n###  if-let guards in matches\n\nRust 1.88 stabilized let chains. Rust 1.95 brings that capability into match expressions, allowing for conditionals based on pattern matching.\n\n\n    match value {  Some(x) if let Ok(y) = compute(x) => {  // Both `x` and `y` are available here  println!(\"{}, {}\", x, y);  }  _ => {} }\n\nNote that the compiler will not currently consider the patterns matched in `if let` guards as part of the exhaustiveness evaluation of the overall match, just like `if` guards.\n\n###  Stabilized APIs\n\n  * MaybeUninit<[T; N]>: From<[MaybeUninit<T>; N]>\n  * MaybeUninit<[T; N]>: AsRef<[MaybeUninit<T>; N]>\n  * MaybeUninit<[T; N]>: AsRef<[MaybeUninit<T>]>\n  * MaybeUninit<[T; N]>: AsMut<[MaybeUninit<T>; N]>\n  * MaybeUninit<[T; N]>: AsMut<[MaybeUninit<T>]>\n  * [MaybeUninit<T>; N]: From<MaybeUninit<[T; N]>>\n  * Cell<[T; N]>: AsRef<[Cell<T>; N]>\n  * Cell<[T; N]>: AsRef<[Cell<T>]>\n  * Cell<[T]>: AsRef<[Cell<T>]>\n  * bool: TryFrom<{integer}>\n  * AtomicPtr::update\n  * AtomicPtr::try_update\n  * AtomicBool::update\n  * AtomicBool::try_update\n  * AtomicIn::update\n  * AtomicIn::try_update\n  * AtomicUn::update\n  * AtomicUn::try_update\n  * cfg_select!\n  * mod core::range\n  * core::range::RangeInclusive\n  * core::range::RangeInclusiveIter\n  * core::hint::cold_path\n  * <*const T>::as_ref_unchecked\n  * <*mut T>::as_ref_unchecked\n  * <*mut T>::as_mut_unchecked\n  * Vec::push_mut\n  * Vec::insert_mut\n  * VecDeque::push_front_mut\n  * VecDeque::push_back_mut\n  * VecDeque::insert_mut\n  * LinkedList::push_front_mut\n  * LinkedList::push_back_mut\n  * Layout::dangling_ptr\n  * Layout::repeat\n  * Layout::repeat_packed\n  * Layout::extend_packed\n\n\n\nThese previously stable APIs are now stable in const contexts:\n\n  * fmt::from_fn\n  * ControlFlow::is_break\n  * ControlFlow::is_continue\n\n\n\n###  Destabilized JSON target specs\n\nRust 1.95 removes support on stable for passing a custom target specification to `rustc`. This should **not** affect any Rust users using a fully stable toolchain, as building the standard library (including just `core`) already required using nightly-only features.\n\nWe're also gathering use cases for custom targets on the tracking issue as we consider whether some form of this feature should eventually be stabilized.\n\n###  Other changes\n\nCheck out everything that changed in Rust, Cargo, and Clippy.\n\n##  Contributors to 1.95.0\n\nMany people came together to create Rust 1.95.0. We couldn't have done it without all of you. Thanks!",
  "title": "Announcing Rust 1.95.0",
  "updatedAt": "2026-04-16T00:00:00.000Z"
}