Migrating to Rust Language 1.88.0
Version 1.88.0 introduces 3 breaking changes. This guide details how to update your code.
Released: 6/26/2025
⚠️ Check Your Code
If you use any of these symbols, you need to read this guide:
#[bench]#[cfg(true)]#[cfg(false)]Cell::updateCell::replaceCell::getCell::get_mutCell::from_mutCell::as_slice_of_cellsHashMap::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[T]::as_chunks_mut[T]::as_chunks_unchecked[T]::as_chunks_unchecked_mut[T]::as_rchunks[T]::as_rchunks_mutffi::c_strNonNull<T>::replace*mut T::replacestd::ptr::swap_nonoverlapping[T; N]::from_fnlibtest --nocapturelibtest --no-captureBreaking Changes
●Issue #1
The `#[bench]` attribute is fully de-stabilized. Usage without `#![feature(custom_test_frameworks)]` which previously triggered a deny-by-default lint since Rust 1.77, will now result in a hard compilation error.
●Issue #2
The borrow checker is stricter regarding always-true patterns, rejecting programs that were previously accepted due to overly permissive checking. Fix by reviewing patterns where borrow checking failed.
●Issue #3
It is now a hard error to use a vector type with a non-Rust ABI unless the required target feature is enabled.
Migration Steps
- 1If you were using the deprecated libtest flag `--nocapture`, update your test invocation to use `--no-capture` instead.
- 2If your code relied on previously accepted invalid declarative macros, you may need to update them, potentially using a `tt` fragment specifier to fix compilation errors.
- 3If you use vector types with non-Rust ABIs, ensure the required target feature is enabled or switch to a Rust ABI.
- 4If you were using the `#[bench]` attribute without `#![feature(custom_test_frameworks)]`, you must either enable that feature or remove the attribute as it is now a hard error.
Release Summary
This release stabilizes several language features like `let_chains` and `naked_functions`, stabilizes numerous APIs including `extract_if` for collections and new slice chunking methods, and introduces breaking changes related to the removal of the `#[bench]` attribute and stricter borrow checking.
Need More Details?
View the full release notes and all changes for Rust Language 1.88.0.
View Full Changelog