Migrating to Rust Language 1.97.0
Version 1.97.0 introduces 3 breaking changes. This guide details how to update your code.
Released: 7/9/2026
⚠️ Check Your Code
If you use any of these symbols, you need to read this guide:
Result<T, Uninhabited>ControlFlow<Uninhabited, T>dead_code_pub_in_binary (lint)div32 (target feature)lam-bh (target feature)lamcas (target feature)ld-seq-sa (target feature)scq (target feature)cfg(target_has_atomic_primitive_alignment)RepeatNffi::FromBytesUntilNulErrorstd::fs::File<{integer}>::isolate_highest_one<{integer}>::isolate_lowest_one<{integer}>::highest_one<{integer}>::lowest_one<{integer}>::bit_widthNonZero<{integer}>::isolate_highest_oneNonZero<{integer}>::isolate_lowest_oneNonZero<{integer}>::highest_oneNonZero<{integer}>::lowest_oneNonZero<{integer}>::bit_widthchar::is_controlbuild.warnings (Cargo config)resolver.lockfile-path (Cargo config)cargo-clean--target-dir--manifest-path--emit (Rustdoc flag)--remap-path-prefix (Rustdoc flag)#[export_name]#[link_name]#[link(name = "...")]tuple index shorthands in struct patternsBreaking Changes
●Issue #1
Prevent deref coercions in `pin!`: writing `pin!(x)` where `x` has type `&mut T` now always produces `Pin<&mut &mut T>`, instead of potentially coercing to `Pin<&mut T>`. This was incorrectly allowed since Rust 1.88.0.
●Issue #2
Error on `#[export_name = "..."]` where the name is empty.
●Issue #3
Syntactically reject tuple index shorthands in struct patterns.
Migration Steps
- 1If you relied on deref coercion in `pin!(x)` where `x` was `&mut T`, update your code to explicitly handle the resulting `Pin<&mut &mut T>` type.
- 2Ensure that `#[export_name]` attributes do not use empty strings.
- 3Update struct pattern matching syntax to avoid tuple index shorthands if they were previously used.
Release Summary
This release stabilizes several integer bit manipulation methods, stabilizes new Cargo configuration options like `build.warnings`, and drops support for older architectures on the nvptx64-nvidia-cuda target.
Need More Details?
View the full release notes and all changes for Rust Language 1.97.0.
View Full Changelog