-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Deny-by-default never type lints #146167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Deny-by-default never type lints #146167
Conversation
rustbot has assigned @petrochenkov. Use |
@bors try |
This comment has been minimized.
This comment has been minimized.
Deny-by-default never type lints
T-lang nominationThis PR marks |
This comment has been minimized.
This comment has been minimized.
@craterbot check |
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
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) |
🎉 Experiment
Footnotes
|
There was a problem hiding this 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 expect
the 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
r=me with #146167 (review) addressed. |
3c8a481
to
47d5c84
Compare
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. |
This comment has been minimized.
This comment has been minimized.
47d5c84
to
86dc39f
Compare
@rustbot ready |
@bors r=lcnr,petrochenkov |
…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
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
769009a
to
08b4323
Compare
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
anddependency_on_unit_never_type_fallback
lints as deny-by-default.Tracking:
!
to a type (RFC 1216) #35121Related: