Rust stabilizes the never type in version 1.99
Rust's never type, written as "!", marks a function that never returns or a place where a value can never occur. The compiler has used it internally for years, but it stayed an unstable feature. On August 24, Rust compiler contributor "waffle" completed the work needed to stabilize it, after more than two years of effort.
The type exists for two reasons. Practically, it lets generic code compile to something tighter: a trait like FromStr can set its error type to the never type when a conversion cannot fail, and the compiler then strips out all the dead error-handling code instead of leaving it in. Philosophically, it gives the type checker a consistent answer for expressions like an infinite loop, which needs some type even though it never produces a value; the never type coerces to any other type because code that would require an actual value is provably unreachable.
Stabilizing it meant resolving a case where the compiler cannot always tell what concrete type an expression should fall back to. Before the 2024 edition, Rust's default fallback for such ambiguous cases was the unit type, (). In the 2024 edition, the fallback was changed to the never type itself, which is a breaking change: code that relied on the old default can now fail to compile. A related problem sat in the standard library's Infallible type, a workaround used before the never type was stable; the plan was always to make Infallible a type alias for the never type once it stabilized, but doing so is itself a separate breaking change that happens to mostly cancel out the fallback change if the two land together.
To gauge the damage, waffle ran crater, the tool that compiles all public crates.io libraries, in April. It found 3,300 crates negatively affected by the combined change, but only seven were fully broken; the rest failed only because they depended on older versions of libraries that had already been fixed upstream. Rust has been warning developers about the coming change since 2024, which gave library maintainers time to prepare. Waffle then worked directly with maintainers of widely used libraries to backport small fixes as patch releases, most commonly adding an explicit return type to a generic function call that previously relied on the () fallback. Several maintainers agreed; some declined, saying the affected versions were past their support window and that users should upgrade or stay on an older Rust release instead. The backports fixed 1,553 of the originally failing crates.
With the remaining breakage judged acceptable, the Rust maintainers decided to proceed: starting in Rust 1.99, the never type is stable and Infallible is a type alias for it. Anyone whose code breaks has three options: stay on Rust 1.98, update dependencies to versions that already carry a fix, or add explicit type annotations at the call sites that trip over the new fallback.
Key facts
- On August 24, Rust compiler contributor "waffle" finished stabilizing the never type (!) after more than two years of work.
- Starting in Rust 1.99, the never type is stable and the standard library's Infallible becomes a type alias for it.
- A crater run in April found 3,300 crates negatively affected by the underlying fallback change, but only seven were fully broken outright.
- Backports to widely used libraries fixed 1,553 of the failing crates; Rust has warned about the change since 2024.
- Developers whose code still breaks can stay on Rust 1.98, update their dependencies, or add explicit type annotations.
Why it matters
The never type lets the compiler prove that certain code paths, such as an error branch on an infallible conversion, can never run, so it can delete that code instead of compiling it. It also gives Rust's type inference a single, consistent rule for expressions like infinite loops that never produce a value. Both were long-standing gaps that developers worked around informally; stabilizing the type closes them at the language level rather than through a library convention.
Who it affects
Rust developers in general gain a tool for writing tighter generic code, particularly around traits like FromStr where a conversion cannot fail. More narrowly, it affects maintainers and users of the 3,300 crates that crater flagged as touched by the change, especially code that calls a generic function without specifying a return type and had been relying on the old () fallback to compile.
How to use it
There is nothing to install or pay for: the behavior ships with the Rust toolchain itself, active from version 1.99 onward. Code that breaks under the new fallback can be fixed by specifying the return type explicitly at the call site, for example writing foo::<()>() instead of foo(); developers can also update to dependency versions that already carry a backported fix, or remain on Rust 1.98 until they are ready to address it.
How solid is it
The stabilization took more than two years and was validated with crater, which compiles the entire public crates.io ecosystem against the change. Rust has also been emitting compiler warnings for code that would break under the new rule since 2024, giving library authors lead time. Waffle additionally worked directly with maintainers of affected libraries to land backported fixes before the change shipped.
Risks and caveats
This is still a breaking change: some code that compiled cleanly before Rust 1.99 will stop compiling. Of the 3,300 crates crater found affected, only seven were fully broken and 1,553 were fixed by backports, but that leaves a portion still exposed if their dependencies are not updated. Some library maintainers declined to backport fixes for versions they consider past end of life, so developers on old dependency versions carry the risk rather than the libraries themselves.