Change8

Migrating to Rust Language 1.86.0

Version 1.86.0 introduces 3 breaking changes. This guide details how to update your code.

Released: 4/3/2025

3
Breaking Changes
5
Migration Steps
44
Affected Symbols

⚠️ Check Your Code

If you use any of these symbols, you need to read this guide:

`missing_abi` lint`clippy::double_neg` lint`#[target_feature]``repr()` attribute`#![test]``#![rustfmt::skip]`raw pointers access`-O` flag`overflowing_literals``i686-unknown-redox` target`i586-unknown-redox` target`i686-unknown-hurd-gnu` target`CStr::from_bytes_with_nul``FromBytesWithNulError``RustcDecodable``RustcEncodable``--logfile` option (libtest)`std::fs::remove_file` (Windows)`f64::next_down``f64::next_up``[_]::get_disjoint_mut``[_]::get_disjoint_unchecked_mut``slice::GetDisjointMutError``HashMap::get_disjoint_mut``HashMap::get_disjoint_unchecked_mut``NonZero::count_ones``Vec::pop_if``sync::Once::wait``sync::Once::wait_force``sync::OnceLock::wait``hint::black_box``io::Cursor::get_mut``io::Cursor::set_position``str::is_char_boundary``str::split_at``str::split_at_checked``str::split_at_mut``str::split_at_mut_checked``cargo login` token argument`SourceID` comparisons (Cargo)`#![no_start]``#![crate_id]``cenum_impl_drop_cast` lint`i686` 32-bit x86 hard-float targets

Breaking Changes

Issue #1

The `wasm_c_abi` future compatibility warning is now a hard error. Users of `wasm-bindgen` must upgrade to at least version 0.2.89, or compilation will fail.

Issue #2

The future incompatibility lint `cenum_impl_drop_cast` has been made into a hard error. It is now an error to cast a field-less enum to an integer if the enum implements `Drop`.

Issue #3

SSE2 is now required for "i686" 32-bit x86 hard-float targets; disabling it causes a warning that will become a hard error eventually. To compile for pre-SSE2 32-bit x86, use a "i586" target instead.

Migration Steps

  1. 1
    If you use `wasm-bindgen`, upgrade it to version 0.2.89 or newer to avoid compilation failure due to the `wasm_c_abi` lint becoming a hard error.
  2. 2
    Review code that casts field-less enums implementing `Drop` to integers, as this is now a hard error.
  3. 3
    If compiling for 32-bit x86 hard-float targets and requiring pre-SSE2 support, switch the target triple to use "i586" instead of "i686".
  4. 4
    When merging Cargo configuration, be aware that keys referring to a program path and its arguments are now replaced rather than combined.
  5. 5
    If you rely on Cargo silently ignoring invocations where both `--package` and `--workspace` are passed but the package is missing, update your scripts as this now results in an error.

Release Summary

This release stabilizes several useful APIs like `next_up`/`next_down` for floats and disjoint mutable slice access, introduces new compiler checks for double negations, and expands platform support with numerous new tier 3 targets. It also hardens error conditions related to `wasm_c_abi` and enum casting.

Need More Details?

View the full release notes and all changes for Rust Language 1.86.0.

View Full Changelog