Skip to content

Conversation

WaffleLapkin
Copy link
Member

@WaffleLapkin WaffleLapkin commented Sep 3, 2025

In Rust 1.89.0 we started emitting these lints in dependencies. I discussed the future steps with @lcnr and we think that before stabilizing the never type (and doing the breaking changes) we should deny the lints for ~4 releases.

This PR marks never_type_fallback_flowing_into_unsafe and dependency_on_unit_never_type_fallback lints as deny-by-default.

Tracking:

Related:

@rustbot
Copy link
Collaborator

rustbot commented Sep 3, 2025

r? @petrochenkov

rustbot has assigned @petrochenkov.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 3, 2025
@WaffleLapkin
Copy link
Member Author

@bors try

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Sep 3, 2025
@WaffleLapkin WaffleLapkin added L-dependency_on_unit_never_type_fallback Lint: dependency_on_unit_never_type_fallback L-never_type_fallback_flowing_into_unsafe Lint: never_type_fallback_flowing_into_unsafe F-never_type `#![feature(never_type)]` I-lang-nominated Nominated for discussion during a lang team meeting. I-lang-easy-decision Issue: The decision needed by the team is conjectured to be easy; this does not imply nomination labels Sep 3, 2025
@WaffleLapkin
Copy link
Member Author

T-lang nomination

This PR marks never_type_fallback_flowing_into_unsafe and dependency_on_unit_never_type_fallback lints as deny-by-default. I think this is the next step towards never type stabilization.

@rust-log-analyzer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Sep 3, 2025

☀️ Try build successful (CI)
Build commit: e90f1ff (e90f1ff63e694965281f833819a486da29772bdf, parent: 51ff895062ba60a7cba53f57af928c3fb7b0f2f4)

@WaffleLapkin
Copy link
Member Author

@craterbot check

@craterbot
Copy link
Collaborator

👌 Experiment pr-146167 created and queued.
🤖 Automatically detected try build e90f1ff
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 4, 2025
@rustbot

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@craterbot
Copy link
Collaborator

🚧 Experiment pr-146167 is now running

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@lcnr
Copy link
Contributor

lcnr commented Sep 8, 2025

I discussed the future steps with @lcnr and we think that before stabilizing the never type (and doing the breaking changes) we should deny the lints for ~4 releases.

I personally would convert the lint to a hard error for a few versions :> Users can still ignore denied lints (e.g. if it's in a dependency)

@craterbot
Copy link
Collaborator

🎉 Experiment pr-146167 is completed!
📊 474 regressed and 3 fixed (693868 total)
📊 1781 spurious results on the retry-regessed-list.txt, consider a retry1 if this is a significant amount.
📰 Open the summary report.

⚠️ If you notice any spurious failure please add them to the denylist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

Footnotes

  1. re-run the experiment with crates=https://crater-reports.s3.amazonaws.com/pr-146167/retry-regressed-list.txt

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Sep 8, 2025
@traviscross traviscross added P-lang-drag-1 Lang team prioritization drag level 1. https://rust-lang.zulipchat.com/#narrow/channel/410516-t-lang T-lang Relevant to the language team and removed T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 9, 2025
@rust-rfcbot rust-rfcbot added the disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. label Sep 10, 2025
@tmandry
Copy link
Member

tmandry commented Sep 10, 2025

@rfcbot reviewed

@nikomatsakis
Copy link
Contributor

@rfcbot reviewed

This seems good! Thanks for your continued pushing on this, @WaffleLapkin -- and the crater results look encouraging, seems like mostly minor stuff.

@rust-rfcbot rust-rfcbot added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels Sep 10, 2025
@rust-rfcbot
Copy link
Collaborator

🔔 This is now entering its final comment period, as per the review above. 🔔

@scottmcm
Copy link
Member

Yay more ! progress!
@rfcbot reviewed

@petrochenkov petrochenkov added S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 10, 2025
@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 Sep 15, 2025
@WaffleLapkin WaffleLapkin added the relnotes Marks issues that should be documented in the release notes of the next release. label Sep 18, 2025
@rust-rfcbot rust-rfcbot added finished-final-comment-period The final comment period is finished for this PR / Issue. to-announce Announce this issue on triage meeting and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Sep 20, 2025
@rust-rfcbot
Copy link
Collaborator

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

This will be merged soon.

@ehuss ehuss mentioned this pull request Oct 1, 2025
@bors
Copy link
Collaborator

bors commented Oct 2, 2025

☔ The latest upstream changes (presumably #147261) made this pull request unmergeable. Please resolve the merge conflicts.

@rustbot
Copy link
Collaborator

rustbot commented Oct 2, 2025

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@WaffleLapkin
Copy link
Member Author

@nikomatsakis (and to the language team in general I guess) can you explain your assessment of the crater run?

I don't see how ~470 unique crater breakages can be considered "minor stuff". 470 unique breakages feels like way too much, especially considering how not everything is tested by crater.

I'm really concerned by this, because I'm not sure how we can proceed with the current plan, given that it requires so much breaking changes.

@traviscross
Copy link
Contributor

traviscross commented Oct 3, 2025

Thanks for the question. You're right it's a non-trivial number, and clearly stability is important to us all. Some items we consider in our analysis:

One, we're not breaking any code, under our normal definitions for these things, with this PR. Even at deny-by-default, we're only currently linting against this. Someone can allow it or use --cap-lints, for now, to continue compiling the program. While we do consider carefully the effect of all lint level changes on users, we do not treat the behavior of lints as being part of our stability guarantee.

Since it's only a lint, it only stops compilation for the project with the affected code. Dependent crates are not affected except being offered the report about dependencies emitting FCWs.

Since we want people to stop relying on this, this is what we want. We want to ratchet up the lints in a way that is directed at the people whose code will need to change.

Two, we've been issuing this FCW for a long time. After a suitably long interval, when changing a behavior we consider to be part of our underspecified language semantics (see RFC 1122), we have historically considered ourselves "within our rights" (after considering all other factors) to make the ("minor", per RFC 1122) breaking change. This is part of what we'll be considering when it is later proposed for this to become a hard error.

Three, when looking at a crater report for this kind of change where we've been issuing an FCW for a long time, we keep in mind that crater checks many pieces of code that are abandoned and will never be updated. If we see evidence that such abandoned code would still create widespread disruption to users, such as because it continues to be relied upon by many actively maintained dependent crates, then we would ask for other mitigating actions to be taken. However, we do not treat abandoned code relying on these areas of underspecified language semantics to be a permanent blocker to making minor breaking changes that we consider valuable.

Four, we look at what we're getting in return for the breakage. Here, the eventual breakage we'll take will allow us to stabilize the never type without the sort of compromises that had stalled prior attempts. That has a lot of value to us, and so we're willing -- carefully and with due consideration for the stability of Rust -- to take the steps necessary to get there.

All together, in this case, that was enough for us to conclude that we can change the lint level, as proposed here, and as confirmed in our FCP.

(Perhaps others on lang have further thoughts.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. F-never_type `#![feature(never_type)]` finished-final-comment-period The final comment period is finished for this PR / Issue. L-dependency_on_unit_never_type_fallback Lint: dependency_on_unit_never_type_fallback L-never_type_fallback_flowing_into_unsafe Lint: never_type_fallback_flowing_into_unsafe relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). T-lang Relevant to the language team to-announce Announce this issue on triage meeting
Projects
None yet
Development

Successfully merging this pull request may close these issues.