Skip to content

stabilize never type#155499

Open
WaffleLapkin wants to merge 13 commits into
rust-lang:mainfrom
WaffleLapkin:stabilize-never-type
Open

stabilize never type#155499
WaffleLapkin wants to merge 13 commits into
rust-lang:mainfrom
WaffleLapkin:stabilize-never-type

Conversation

@WaffleLapkin

@WaffleLapkin WaffleLapkin commented Apr 18, 2026

Copy link
Copy Markdown
Member

View all comments

This PR:

Cat:
52270233795_5979a3174d_b

Tracking:

Stabilization plan FCP:

Lint bump:

Rust 2024 edition change:

@rustbot

This comment was marked as off-topic.

@rustbot

This comment was marked as off-topic.

@rustbot rustbot added A-rustdoc-js Area: Rustdoc's JS front-end A-rustdoc-json Area: Rustdoc JSON backend A-rustdoc-search Area: Rustdoc's search feature S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Apr 18, 2026
@rustbot

rustbot commented Apr 18, 2026

Copy link
Copy Markdown
Collaborator

⚠️ Warning ⚠️

@WaffleLapkin WaffleLapkin marked this pull request as draft April 18, 2026 22:14
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 18, 2026
@WaffleLapkin

Copy link
Copy Markdown
Member Author

@bors try

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Apr 18, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-bors

rust-bors Bot commented Apr 19, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 1c4199d (1c4199da70f816f2239f41c55168ff75a3663718, parent: b2f1ccf524a3a4cf9c34545167cc23b659cf1cbd)

@jackh726

Copy link
Copy Markdown
Member

As a reviewer and attendee of the lang meeting yesterday:

There was some concern about the amount of breakage in the crater run for this (~3300 crates).

Some next steps:

  • @WaffleLapkin said that they would run a similar crater run, but without changing fallback on edition < 2024
    • If there is less breakage, that might be a better stabilization target
    • There may be some "common pattern" in there that we could write a targeted hack for to smooth over the breakage for now (this would be on the types team to figure out)
  • It would be good to try to get some of the crates with more dependents from the crater run to release patches for older versions that could fix a larger portion of the breakage
    • This can/should happen in parallel

Ultimately, I get the sense that we would accept this breakage if we have to, but it would be good to dot our I's and cross our T's on minimizing.

Given this, as a reviewer, marking as blocked. @WaffleLapkin let me know if there's anything you need to me to do to help move this forward.

@WaffleLapkin

WaffleLapkin commented May 7, 2026

Copy link
Copy Markdown
Member Author

Current status on library backports:

@nihohit

nihohit commented May 12, 2026

Copy link
Copy Markdown

Hi, the maintainer of the redis-rs crate here, just wanted to add thanks for @WaffleLapkin for the fixes - it took the work on itself, and fixed old versions that were in quite a sorry state CI-wise regardless of this change, while being polite and communicative. Thanks for the exemplary behavior!

@traviscross traviscross added the I-lang-nominated Nominated for discussion during a lang team meeting. label May 27, 2026
@traviscross

traviscross commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

After the last lang call, I checked in with @WaffleLapkin about this. There are some minor matters affecting the library side (Infallible = !) that are being addressed. Libs-api OKed the breakage via FCP. For details, see:

These are the pending bits of type system work that had been referenced in our call. These do not affect the breakage that's in front of us due to changing the never-to-any coercion fallback type in older editions.

From us, what @WaffleLapkin wants is our OK on this stabilization (including this breakage) subject to these planned fixes landing.

That makes sense to me.

Proposal: Let's accept this stabilization — stabilize the never type, switch the never-to-any coercion fallback type to ! in Rust 2015, 2018, and 2021, and remove the dependency_on_unit_never_type_fallback lint — accepting the resulting breakage in older editions due to the fallback change,1 subject to the unrelated fixes described in #155924 landing before this PR is merged.

This completes the last step of the plan for stabilizing ! that we approved in #123508 (comment).

Never say never.

@rfcbot fcp merge lang

Footnotes

  1. For analysis related to accepting this breakage, see my remarks on #146167.

@rust-rfcbot

rust-rfcbot commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

@traviscross has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns.
See this document for info about what commands tagged team members can give me.

@rust-rfcbot rust-rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Jun 10, 2026
@traviscross traviscross added the needs-reference-pr This language change needs an approved Reference PR to proceed. label Jun 10, 2026
@nikomatsakis

Copy link
Copy Markdown
Contributor

@rfcbot reviewed

@tmandry

tmandry commented Jun 10, 2026

Copy link
Copy Markdown
Member

Thanks so much @WaffleLapkin for driving this forward!

@rfcbot reviewed

@traviscross traviscross removed I-lang-nominated Nominated for discussion during a lang team meeting. P-lang-drag-1 Lang team prioritization drag level 1. https://rust-lang.zulipchat.com/#narrow/channel/410516-t-lang labels Jun 10, 2026
@joshtriplett

joshtriplett commented Jun 10, 2026

Copy link
Copy Markdown
Member

Never shall never stable'd be until
Great Waffle'd work to high Rust hill
Shall come against it.

(with apologies to the Scottish play)

@Qix-

Qix- commented Jun 10, 2026

Copy link
Copy Markdown

Thank you for pushing this @WaffleLapkin. It's going to be a huge improvement to a lot of code. Very exciting :)

@BoxyUwU

BoxyUwU commented Jun 10, 2026

Copy link
Copy Markdown
Member

cc @rust-lang/types

@jackh726

Copy link
Copy Markdown
Member

Yeah, thinking about it, types probably should have been on this FCP (because of changes to fallback). In practice, I don't care all that much - and I don't think anyone else on the team will either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-rustdoc-js Area: Rustdoc's JS front-end A-rustdoc-json Area: Rustdoc JSON backend A-rustdoc-search Area: Rustdoc's search feature disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. I-lang-radar Items that are on lang's radar and will need eventual work or consideration. needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. needs-reference-pr This language change needs an approved Reference PR to proceed. proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. S-blocked Status: Blocked on something else such as an RFC or other implementation work. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.