Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Stabilize never type (!)

Metadata
Point of contactwaffle
StatusProposed
Tracking issue
Other Tracking issue(s)https://github.com/rust-lang/rust/issues/35121
HighlightTry, never, extern types
Zulip channelN/A
Teamslang, types
Task ownerswaffle, Jana Dönszelmann

Summary

Stabilize the never type aka !.

Motivation

The status quo

The never type has been unstable for 10 years, with all previous attempts to stabilize it failing. There is a plan to stabilize it, however it still needs to be implemented in reality.

What we propose to do about it

Implement the plan! There are only a few outstanding issues to be solved. After they are done, the never type can be stabilized.

Work items over the next year

TaskOwner(s)Notes
Don’t consider Result<T, !> as must_use unless T iswafflehttps://github.com/rust-lang/rust/pull/148214
Improve dead-code lint to work with never type fallbackJana Dönszelmann, wafflehttps://github.com/rust-lang/rust/issues/146085
Further restrict what coercions are allowed on places of type !wafflehttps://github.com/rust-lang/rust/issues/131297
Re-assess the breakage needed for the fallback changewaffle
Stabilize the never type!waffle

Team asks

TeamSupport levelNotes
typessmallWe expect to only need normal reviews
langsmallMost of the plans / design was already approved, only minor sign-offs required

Frequently asked questions

N/A