Change8

Migrating to Rust Language 1.85.0

Version 1.85.0 introduces 2 breaking changes. This guide details how to update your code.

Released: 2/20/2025

2
Breaking Changes
3
Migration Steps
39
Affected Symbols

⚠️ Check Your Code

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

std::env::home_dircore::ffi::c_char-Zpolymorphizetest cfgstd::hash::BuildHasherDefault::newstd::ptr::fn_addr_eqstd::io::ErrorKind::QuotaExceededstd::io::ErrorKind::CrossesDevicesf32::midpointu64::midpointNonZeroU*std::iter::Extendstd::iter::FromIteratorstd::task::Waker::noopstd::mem::size_of_valstd::mem::align_of_valstd::alloc::Layout::for_valuestd::alloc::Layout::align_tostd::alloc::Layout::pad_to_alignstd::alloc::Layout::extendstd::alloc::Layout::arraystd::mem::swapstd::ptr::swapstd::ptr::NonNull::newstd::collections::HashMap::with_hasherstd::collections::HashSet::with_hasherf32::recipf32::to_degreesf32::to_radiansf32::maxf32::minf32::clampf32::absf32::signumf32::copysignstd::mem::MaybeUninit::write#[diagnostic::do_not_recommend]#[no_mangle]#[export_name]

Breaking Changes

Issue #1

The unstable flag `-Zpolymorphize` has been removed. Users relying on this flag must update their build process or code.

Issue #2

The signedness of `core::ffi::c_char` now more closely matches the platform-default `char` on many Tier 2 and 3 targets (mostly Arm and RISC-V embedded targets). This may cause compilation failures if code relied on the previous fixed size/signedness (e.g., assuming it was always i8).

Migration Steps

  1. 1
    If you were using the unstable flag `-Zpolymorphize`, remove it from your build configuration.
  2. 2
    Review code that interacts with `core::ffi::c_char` on Tier 2/3 targets (especially Arm/RISC-V embedded) as its signedness may have changed.
  3. 3
    If you rely on Cargo's behavior regarding the `test` cfg, note that `rustc` no longer treats it as well known by default; ensure your build system (like Cargo) correctly sets it via `--check-cfg=cfg(test)` if needed.

Release Summary

This release stabilizes the Rust 2024 Edition and async closures, alongside numerous API stabilizations and compiler improvements. A key compatibility change involves how `core::ffi::c_char` signedness is determined and how the `test` cfg is handled.

Need More Details?

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

View Full Changelog