Rust versions / 1.88
Rust release · Jun 26, 2025
Rust 1.88: what's new, what was stabilized
Short answerRust 1.88 was released on Jun 26, 2025: 3 language stabilizations ([Stabilize #![feature(let_chains)] in the 2024 edition.](https://github.com/rust-lang/rust...); 27 newly stable APIs (Cell::update, impl Default for *const T, impl Default for *mut T, HashMap::extract_if, ...); 5 compatibility notes that can affect existing code.
← Rust 1.87All versionsRust 1.89 →
Language features stabilized
- [Stabilize #![feature(let_chains)] in the 2024 edition.](https://github.com/rust-lang/rust/pull/132833)
- [Stabilize #![feature(naked_functions)].](https://github.com/rust-lang/rust/pull/134213)
- [Stabilize #![feature(cfg_boolean_literals)].](https://github.com/rust-lang/rust/pull/138632)
27 APIs stabilized
Cell::update, impl Default for *const T, impl Default for *mut T, HashMap::extract_if, HashSet::extract_if, hint::select_unpredictable, proc_macro::Span::line, proc_macro::Span::column, proc_macro::Span::start, proc_macro::Span::end, proc_macro::Span::file, proc_macro::Span::local_file, <[T]>::as_chunks, <[T]>::as_chunks_mut, <[T]>::as_chunks_unchecked, <[T]>::as_chunks_unchecked_mut, <[T]>::as_rchunks, <[T]>::as_rchunks_mut, mod ffi::c_str, NonNull<T>::replace, <*mut T>::replace, std::ptr::swap_nonoverlapping, Cell::replace, Cell::get, Cell::get_mut, Cell::from_mut, Cell::as_slice_of_cells
Can it break my build?
The release lists these compatibility notes. Most only affect rare code, but read them before you raise your toolchain in CI:
- Finish changing the internal representation of pasted tokens. Certain invalid declarative macros that were previously accepted in obscure circumstances are now correctly rejected by the compiler. Use of a
ttfragment specifier can often fix these macros. - [Fully de-stabilize the
#[bench]attribute](https://github.com/rust-lang/rust/pull/134273). Usage of#[bench]without#![feature(custom_test_frameworks)]already triggered a deny-by-default future-incompatibility lint since Rust 1.77, but will now become a hard error. - Fix borrow checking some always-true patterns.
- Update the minimum external LLVM to 19.
- Make it a hard error to use a vector type with a non-Rust ABI without enabling the required target feature.
Use it
rustup update stable # get the newest release
rustup install 1.88 # or exactly this one
rustup override set 1.88 # pin a project to itTo require at least this version from users of your crate, set rust-version = "1.88" under [package] in Cargo.toml. Cargo then refuses to build it on older compilers with a clear message, and with resolver 3 (the default on the 2024 edition, Rust 1.85+) it also prefers dependency versions that support it.
Full release notes
Language
- [Stabilize
#![feature(let_chains)]in the 2024 edition.](https://github.com/rust-lang/rust/pull/132833) This feature allows&&-chainingletstatements insideifandwhile, allowing intermixture with boolean expressions. The patterns inside theletsub-expressions can be irrefutable or refutable. - [Stabilize
#![feature(naked_functions)].](https://github.com/rust-lang/rust/pull/134213) Naked functions allow writing functions with no compiler-generated epilogue and prologue, allowing full control over the generated assembly for a particular function. - [Stabilize
#![feature(cfg_boolean_literals)].](https://github.com/rust-lang/rust/pull/138632) This allows using boolean literals ascfgpredicates, e.g.#[cfg(true)]and#[cfg(false)]. - [Fully de-stabilize the
#[bench]attribute](https://github.com/rust-lang/rust/pull/134273). Usage of#[bench]without#![feature(custom_test_frameworks)]already triggered a deny-by-default future-incompatibility lint since Rust 1.77, but will now become a hard error. - Add warn-by-default
dangerous_implicit_autorefslint against implicit autoref of raw pointer dereference. The lint will be bumped to deny-by-default in the next version of Rust. - Add
invalid_null_argumentslint to prevent invalid usage of null pointers. This lint is uplifted fromclippy::invalid_null_ptr_usage. - Change trait impl candidate preference for builtin impls and trivial where-clauses.
- Check types of generic const parameter defaults
<a id="1.88.0-Compiler"></a>
Compiler
<a id="1.88.0-Platform-Support"></a>
Platform Support
Refer to Rust's platform support page for more information on Rust's tiered platform support.
<a id="1.88.0-Libraries"></a>
Libraries
- [Remove backticks from
#[should_panic]test failure message.](https://github.com/rust-lang/rust/pull/136160) - [Guarantee that
[T; N]::from_fnis generated in order of increasing indices.](https://github.com/rust-lang/rust/pull/139099), for those passing it a stateful closure. - The libtest flag
--nocaptureis deprecated in favor of the more consistent--no-captureflag. - Guarantee that
{float}::NANis a quiet NaN.
<a id="1.88.0-Stabilized-APIs"></a>
Stabilized APIs
Cell::updateimpl Default for *const Timpl Default for *mut THashMap::extract_ifHashSet::extract_ifhint::select_unpredictableproc_macro::Span::lineproc_macro::Span::columnproc_macro::Span::startproc_macro::Span::endproc_macro::Span::fileproc_macro::Span::local_file- [
<[T]>::as_chunks](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_chunks) - [
<[T]>::as_chunks_mut](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_chunks_mut) - [
<[T]>::as_chunks_unchecked](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_chunks_unchecked) - [
<[T]>::as_chunks_unchecked_mut](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_chunks_unchecked_mut) - [
<[T]>::as_rchunks](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_rchunks) - [
<[T]>::as_rchunks_mut](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_rchunks_mut) mod ffi::c_str
These previously stable APIs are now stable in const contexts:
NonNull<T>::replace<*mut T>::replacestd::ptr::swap_nonoverlappingCell::replaceCell::getCell::get_mutCell::from_mutCell::as_slice_of_cells
<a id="1.88.0-Cargo"></a>
Cargo
<a id="1.88.0-Rustdoc"></a>
Rustdoc
- Doctests can be ignored based on target names using
ignore-*attributes. - Stabilize the
--test-runtooland--test-runtool-argCLI options to specify a program (like qemu) and its arguments to run a doctest.
<a id="1.88.0-Compatibility-Notes"></a>
Compatibility Notes
- Finish changing the internal representation of pasted tokens. Certain invalid declarative macros that were previously accepted in obscure circumstances are now correctly rejected by the compiler. Use of a
ttfragment specifier can often fix these macros. - [Fully de-stabilize the
#[bench]attribute](https://github.com/rust-lang/rust/pull/134273). Usage of#[bench]without#![feature(custom_test_frameworks)]already triggered a deny-by-default future-incompatibility lint since Rust 1.77, but will now become a hard error. - Fix borrow checking some always-true patterns. The borrow checker was overly permissive in some cases, allowing programs that shouldn't have compiled.
- Update the minimum external LLVM to 19.
- Make it a hard error to use a vector type with a non-Rust ABI without enabling the required target feature.
Release notes from the Rust project's RELEASES.md (MIT or Apache-2.0); summaries above are ours.
Up next
Next releaseRust 1.89Released Aug 7, 2025.Read it next →Also worth your time
Did this answer your question?