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
@WaffleLapkin WaffleLapkin 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-t-lang Status: Awaiting decision from T-lang labels Oct 6, 2025
@WaffleLapkin WaffleLapkin added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 14, 2025
Copy link
Contributor

@lcnr lcnr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like it's probably better to expectthe fallback lint in the non-lint tests to make it more obvious they're not supposed to fail without any features rn :>

r=me after that

View changes since this review

@petrochenkov
Copy link
Contributor

r=me with #146167 (review) addressed.
@rustbot author

@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 Oct 15, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 17, 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.

@WaffleLapkin
Copy link
Member Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 18, 2025
@WaffleLapkin
Copy link
Member Author

@bors r=lcnr,petrochenkov

@bors
Copy link
Collaborator

bors commented Oct 18, 2025

📌 Commit 769009a has been approved by lcnr,petrochenkov

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 18, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 18, 2025
…r=lcnr,petrochenkov

Deny-by-default never type lints

In Rust [1.89.0](https://github.com/rust-lang/rust/milestone/133) 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:

- rust-lang#35121

Related:

- rust-lang#141937
bors added a commit that referenced this pull request Oct 18, 2025
Rollup of 8 pull requests

Successful merges:

 - #138679 (Issue-125323: ICE non-ADT in struct pattern when long time constant evaluation is in for loop)
 - #146167 (Deny-by-default never type lints)
 - #146490 (Rehome 26 `tests/ui/issues/` tests to other subdirectories under `tests/ui/` [#5 of Batch #2])
 - #147438 (Rename "non-inline module" to "file module" in proc macro diagnostics)
 - #147724 (Fix ICE in pattern matching with generic const array length errors)
 - #147813 (Warn on unused_attributes in uitests )
 - #147816 (Do not error out for `download-rustc` if LTO is configured)
 - #147845 (Add regression test for 134355)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 18, 2025
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-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.