Skip to main content

Rust 1.97.0

Release Date: July 9, 2026

Rust 1.97.0 just shipped — and it is packed with polish, platform updates, and powerful new primitives for the integer set.

Language Lift

  • Must-Use SmarterResult<T, Uninhabited> and ControlFlow<Uninhabited, T> now count as equivalent to T for must-use lint purposes, eliminating false positives in generic code.
  • Dead Code Detective — New allow-by-default dead_code_pub_in_binary lint catches unused pub items specifically in binary crates, keeping library boundaries clean.
  • Trailing Self — Trailing self in imports now works in more scenarios, making use statements more intuitive and reducing friction when reorganizing modules.

Platform Push

  • Target Features Stabilizeddiv32, lam-bh, lamcas, ld-seq-sa, and scq target features are now stable for use in cfg! and target_feature attributes.
  • Atomic Alignmentcfg(target_has_atomic_primitive_alignment) enables conditional compilation based on atomic alignment guarantees for more portable low-level code.
  • CUDA Cleanup — The nvptx64-nvidia-cuda target drops support for old architectures and old ISAs, streamlining the maintainability of the NVPTX backend.

Stabilized API Stack

  • Default for RepeatN — Iterator repeat helper now implements Default.
  • Copy for ffi::FromBytesUntilNulError — Error type gains Copy semantics for ergonomic error handling.
  • Send for File on UEFI — File handles are now Send on UEFI targets.
  • Integer Bit Gymnasticsisolate_highest_one, isolate_lowest_one, highest_one, lowest_one, and bit_width land on all integer types for direct bit-manipulation without external crates.

Upgrade when you are ready — but with no major breaking changes and a hefty batch of stabilizations, there is little reason to wait. Run rustup update stable and get 1.97.0 today.

What is New?

By continuing to use the site, you agree to the use of cookies.