Rust 1.100 stabilizes never type, with one breaking change to check
Rust 1.100 stabilizes the never type and allocator API. See the fallback breaking change, Cargo cooldown limits and platform tier updates.
The Rust project released Rust 1.100.0 on Nov. 12, stabilizing the never type (!) after 10 years and five failed attempts. The release also stabilizes the core of the allocator API and a Cargo setting that delays adopting freshly published crate versions. The release post also discloses one deliberate breaking change that existing crates should check.
That break is the biggest migration item. To make std::convert::Infallible an alias of !, the team changed the "never type fallback" from () to ! in editions 2015, 2018 and 2021, matching what edition 2024 already did. The post calls this "largely unnoticeable" but says it can affect code in rare cases, for example when ignoring the result of a function that returns a generic parameter. It can also make the compiler flag more code as unreachable. The team says it issued future-compatibility warnings well ahead of time and shipped fixes to public crates that broke. If a dependency fails to build, the post advises updating it first.
Upgrade path
rustup update stable
The beta (rustup default beta) and nightly channels are available for testing future releases. The detailed release notes cover Cargo, Clippy and platform changes.
What is stabilized
Never type. ! can now be named anywhere, not only as a function return type. The post's example is fn infallible_unwrap<T>(res: Result<T, !>) -> T, where let Ok(v) = res; is accepted because the error case is uninhabited. impl AsRef<T> for ! and impl AsMut<T> for ! are also stabilized.
Allocator API. The core parts of allocator_api are stable, so library authors can define custom allocators for certain std types. The stabilized list includes the Allocator trait, Global and System, plus Box::new_in, Vec::new_in, Vec::with_capacity_in and related raw-parts methods. Allocator implementations for Rc and Arc are listed too.
DropGuard. core::mem::DropGuard runs a closure when dropped, and DropGuard::dismiss returns the wrapped value without running it. The post's example rolls back a Vec<u32> if parsing any string fails:
let len = nums.len();
let mut nums = DropGuard::new(nums, move |nums| { nums.truncate(len); });
for s in strings { nums.push(s.parse()?); }
DropGuard::dismiss(nums);
dismiss is an associated function rather than a method, the post says, to avoid name collisions with methods on the inner type reached through DerefMut.
Zero-sized types. core::mem::conjure_zst is stabilized as the recommended way to create zero-sized types in unsafe code. The post's PyO3 discussion warns that conjuring a token "from thin air" could let safe calls violate a precondition such as holding a lock.
Smaller APIs. The list includes bool::toggle, Box::take, Box::map, Rc::map, Arc::map, str::trim_prefix and trim_suffix (also on slices, plus Path::trim_prefix), Vec::from_fn, UnsafeCell::replace, and os::windows::process::CommandExt::show_window.
Cargo changes that touch builds
Unused dependency warnings. Cargo now reports unused dependencies under a new cargo::unused_dependencies lint, set to warn by default and controlled through a [lints.cargo] table in Cargo.toml. The post lists two limits. The warning only appears when every build target that might use a dependency is built, so cargo check --bin foo won't surface unused [dependencies]. Dev-dependencies are never reported. Teams that build with warnings denied should expect new CI noise. In the Hacker News thread, a Cargo team member said the feature should cover much of what tools like cargo-machete and cargo-udeps do, with dev-dependency detection the main gap. That is discussion, not a measured result.
Cache layout. Cargo builds libraries and binaries in build-dir and uplifts final artifacts to target-dir. The post says the change is internal but "may break build processes and tests that had workarounds for missing or incomplete features." It points to cargo#17287 for solutions; that issue was not independently read. Anyone whose scripts reach into target/ for intermediate files should check them.
Dependency cooldowns. Cargo's min-publish-age aware resolution is stable and opt-in via .cargo/config.toml:
[registry]
global-min-publish-age = "3 days"
When selecting versions, Cargo skips eligible versions published more recently than the threshold and reports what it held back, for example Adding clap 4.6.7 (available: 4.6.9, published 2 days ago). The post's rationale is that malicious versions are often caught within hours or days. Limits apply: versions that lack a registry publication timestamp are not held back, and cargo install ignores the minimum publish age, for both the installed crate and its dependencies, per the release materials. The post also cautions that cooldowns are not a complete defense. A single update can bypass the check with CARGO_RESOLVER_INCOMPATIBLE_PUBLISH_AGE=allow cargo update clap --precise 4.6.9, and the newer version is then recorded in Cargo.lock.
Hacker News commenters debated the tradeoffs, including the risk of delaying fixes, and one noted that security advisories should still be patched immediately rather than waiting out a cooldown. A Cargo team member said cargo install was left out for consistency with the MSRV-aware resolver, and another commenter noted that cargo install now uses the lockfile in the .crate tarball by default.
Platforms and MSRV
The detailed release notes list three platform changes: i686-pc-windows-gnu is now tier 2 without host tools, wasm32-wasip3 moves to tier 2, and powerpc64-sony-ps3 is added at tier 3.
On minimum supported Rust version, a crate that requires a newly stabilized API, such as DropGuard or the allocator API, will need Rust 1.100 or later. Crates that don't use them, or that use them only conditionally, are not forced up.
Comments ()