Skip to content
← ENGINEERING NOTES
RUST / C / C++8 min read

Rust 1.100: Never Type, Allocators, Cargo Lints

Rust 1.100 stabilizes the never type and the Allocator trait, adds Cargo lints and dependency cooldowns. Tested code, upgrade gotchas and what could break.

BY ASHLIN DARIUS GOVINDASAMY

Rust just hit three digits. Rust 1.100.0 shipped on 12 November 2026 and finally stabilizes two things people have waited years for: the never type (!) and the Allocator trait, so Box and Vec can take a custom allocator on stable. Cargo also grew a lint system and a supply-chain cooldown. This post walks through what changed, shows code I compiled and ran on rustc 1.100.0, and lists the spots where an upgrade can bite.

What Rust 1.100 changes at a glance

The release notes group the big items under language, library and Cargo. Here is the short version, straight from the project's RELEASES.md.

  • Language: the never type is stabilized, as is extern "custom". repr(align) fields inside a repr(packed) type now trip a deny-by-default lint, aligned_fields_in_packed.
  • Library: custom allocators are stabilized. That includes the Allocator trait, Global and System, plus allocator-aware constructors such as Box::new_in and Vec::with_capacity_in.
  • Cargo: a linting system configured under [lints.cargo], including an unused_dependencies lint, and a minimum publish age for dependencies (RFC 3923).
  • Cargo: cargo install now uses the lockfile bundled in the .crate tarball by default, which makes --locked a no-op.
  • Platforms: wasm32-wasip3 is promoted to Tier 2, and i686-pc-windows-gnu becomes Tier 2 without host tools.

The never type, stable at last

The never type, written !, is the type of an expression that never produces a value: panic!, process::exit, an infinite loop. Rust has always let you write functions that return !, but using ! as an ordinary type in other positions was gated. With 1.100 it is a normal type you can name in generics, which pays off most in error handling: a Result<T, !> is a Result that provably cannot be an Err.

rust
use std::convert::Infallible;

fn parse(s: &str) -> u32 {
    match s.parse::<u32>() {
        Ok(n) => n,
        Err(_) => panic!("bad number"), // type ! coerces to u32
    }
}

// A Result that cannot fail: the Err arm has no values.
fn never_demo(s: &str) -> Result<u32, Infallible> {
    let r: Result<u32, !> = Ok(parse(s));
    match r {
        Ok(n) => Ok(n), // no Err arm needed, ! is uninhabited
    }
}

fn main() {
    println!("{:?}", never_demo("42"));
}
never.rs: ! as a real type on stable 1.100

I compiled this with rustc 1.100.0 and it prints Ok(42). Notice the match has a single arm: because ! has no values, the compiler knows the Err case is unreachable. The release notes also say Infallible is now a type alias for !, which is why the two types mix freely above.

QUICK CHECK

Why does a match on a Result<u32, !> need only an Ok arm?

Custom allocators on stable: the Allocator trait

This is the headline for systems work. The notes list the Allocator trait, Global and System as stable, along with allocator-aware Box and Vec constructors like Box::new_in and Vec::with_capacity_in. Until now you needed nightly, or a global allocator that changed the whole process. Now one collection can use an arena, a pool or a tracking allocator while the rest of the program stays on the default heap.

Here is a tiny counting allocator that wraps Global and tracks live bytes. It runs on stable 1.100.0 and printed 1024, 1088 and 0 for my three checkpoints.

rust
use std::alloc::{AllocError, Allocator, Global, Layout};
use std::ptr::NonNull;
use std::sync::atomic::{AtomicUsize, Ordering};

struct Counting<'a> {
    live: &'a AtomicUsize,
}

unsafe impl Allocator for Counting<'_> {
    fn allocate(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError> {
        let p = Global.allocate(layout)?;
        self.live.fetch_add(layout.size(), Ordering::Relaxed);
        Ok(p)
    }
    unsafe fn deallocate(&self, ptr: NonNull<u8>, layout: Layout) {
        self.live.fetch_sub(layout.size(), Ordering::Relaxed);
        unsafe { Global.deallocate(ptr, layout) }
    }
}

fn main() {
    let live = AtomicUsize::new(0);
    {
        let mut v = Vec::with_capacity_in(1024, Counting { live: &live });
        v.extend(0..200u8);
        println!("vec alive: {}", live.load(Ordering::Relaxed));
        let b = Box::new_in([0u64; 8], Counting { live: &live });
        println!("plus box: {}", live.load(Ordering::Relaxed));
        drop(b);
    }
    println!("after drops: {}", live.load(Ordering::Relaxed));
}
counting.rs: per-collection allocator accounting

Two details to notice. First, the trait is unsafe to implement: you promise that memory you hand out is valid for the layout and that deallocate gets the same layout back. Second, the allocator is a value stored inside the collection, so it travels with the Vec or Box. That is what makes arenas, per-request bump allocators and NUMA-pinned pools practical without touching your global allocator.

›Deep dive: why type inference may complain after upgrading

The compatibility notes warn that some Box impls were generalized to arbitrary allocators, which may cause new type inference errors. Previously Box<T> implied the Global allocator. Now many impls are written over Box<T, A>, so a call that used to have exactly one candidate can become ambiguous. The usual fix is an explicit annotation, such as Box<Foo> or a turbofish, at the call that fails.

Cargo grows lints and dependency cooldowns

Cargo now has its own linting system, configured under [lints.cargo] in Cargo.toml, alongside the [lints.rust] and [lints.clippy] tables you may already use. The first notable lint is unused_dependencies. I tested it by adding itoa to a crate that never uses it.

toml
[package]
name = "demo"
version = "0.1.0"
edition = "2024"

[dependencies]
itoa = "1"

[lints.cargo]
unused_dependencies = "warn"
Cargo.toml: warn about dead dependencies

cargo check on 1.100.0 answered with: warning: unused dependency itoa, note: cargo::unused_dependencies is set to warn in [lints], help: consider removing the dependency on itoa. Set the level to deny in CI and dead dependencies stop piling up, which shrinks your build times and your attack surface.

The other Cargo change matters for security. The release adds a minimum publish age per RFC 3923, often called a dependency cooldown. The idea is that newly published crate versions are not selected until they have existed for a set period, giving the community time to spot a hijacked or malicious release before your resolver pulls it in. I did not verify the exact configuration key in the sources I could reach, so check the Cargo documentation for the current spelling before you add it to a config file.

Upgrade checklist and gotchas

  • Update with rustup update stable, then confirm with rustc --version.
  • Run cargo check and cargo clippy on every workspace member. Watch for new errors from never-type fallback and from Box inference.
  • Closures capture variables used in if let more precisely now, which the notes say may cause new errors.
  • box patterns are no longer syntactically allowed. Replace them with ordinary matching.
  • Iterator::min and max changed which Ord methods they use, which can matter for hand-written Ord impls with side effects.
  • Build tooling that scrapes target directories should read Cargo's JSON messages: the intermediate build artifact layout changed.
  • Fix any scripts that compare Rust versions as strings, as above.
bash
rustup update stable
rustc --version
cargo check --workspace --all-targets

# Text sort thinks 1.99.0 is newer than 1.100.0. Version sort gets it right.
printf '1.99.0\n1.100.0\n' | sort | tail -1     # 1.99.0  (wrong)
printf '1.99.0\n1.100.0\n' | sort -V | tail -1  # 1.100.0 (right)
Upgrade and the three-digit trap

QUICK CHECK

What is the best way to compare Rust version numbers in a shell script now that 1.100.0 exists?

Takeaway

Rust 1.100 is the kind of release that makes systems code nicer rather than louder. The never type tidies up error handling, stable allocators open arenas and pools to everyone, and Cargo finally helps you police dependencies. Upgrade on a branch, let the compiler tell you what changed, and add unused_dependencies to CI today.

SOURCES

  1. Rust RELEASES.md, Version 1.100.0 (released 2026-11-12) — The Rust Project

Frequently asked questions

When was Rust 1.100.0 released?

Rust 1.100.0 was released on 12 November 2026, according to the project's RELEASES.md. Install it with rustup update stable.

Can I use custom allocators on stable Rust now?

Yes. Rust 1.100 stabilizes the Allocator trait, Global and System, plus allocator-aware constructors like Box::new_in and Vec::with_capacity_in, so no nightly compiler is needed.

What does the never type do?

The never type ! is the type of expressions that never return a value. As a stable type it lets you write things like Result<T, !>, where the compiler knows the error case cannot occur.

How do I find unused dependencies with Cargo?

Add unused_dependencies = "warn" under [lints.cargo] in Cargo.toml and run cargo check on Rust 1.100 or newer. Use deny in CI to fail the build.

NEWSLETTER

Get the engineering notes in your inbox.

Kernels, GPUs, networks, AI infrastructure — and the things we broke along the way. No spam, one click to leave.

We store only your email address, to send you new articles. See our privacy policy.

TAGS

rustrust-1.100allocatornever-typecargosupply-chainrelease

RELATED

ENGINEERING NOTES

Things we built.Things we broke.Things we learned.