Stabilize never type (!)
| Metadata | |
|---|---|
| Point of contact | waffle |
| Status | Proposed |
| Tracking issue | |
| Other Tracking issue(s) | https://github.com/rust-lang/rust/issues/35121 |
| Highlight | Try, never, extern types |
| Zulip channel | N/A |
| Teams | lang, types |
| Task owners | waffle, 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
| Task | Owner(s) | Notes |
|---|---|---|
Don’t consider Result<T, !> as must_use unless T is | waffle | https://github.com/rust-lang/rust/pull/148214 |
| Improve dead-code lint to work with never type fallback | Jana Dönszelmann, waffle | https://github.com/rust-lang/rust/issues/146085 |
Further restrict what coercions are allowed on places of type ! | waffle | https://github.com/rust-lang/rust/issues/131297 |
| Re-assess the breakage needed for the fallback change | waffle | |
| Stabilize the never type! | waffle |
Team asks
| Team | Support level | Notes |
|---|---|---|
| types | small | We expect to only need normal reviews |
| lang | small | Most of the plans / design was already approved, only minor sign-offs required |
Frequently asked questions
N/A