-
Notifications
You must be signed in to change notification settings - Fork 12.1k
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
Implement lint for obligations broken by never type fallback change #125289
base: master
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
So, yeah, we talked about this. IIRC, what I said was basically like "we can't find diff two error sets" but as long as we only try to report We can chat on zulip about details here, but I would probably approach this by selecting a couple test cases where you want better diagnostics, then look at the errors that you get and what info is there, then figure out how to extract out that info. Then you can generalize across tests. |
Quite a few of existing tests get the warning, should I do something with it? The options I see are bless them (what I currently did), fix them and allow the warning. |
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #125313) made this pull request unmergeable. Please resolve the merge conflicts. |
fec6f70
to
cedada8
Compare
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
This comment has been minimized.
This comment has been minimized.
cedada8
to
596bbcb
Compare
This comment has been minimized.
This comment has been minimized.
Don't depend on the fact that `!` falls back to `()` and so panic-ish things can be used in `-> impl ImplementedForUnit` functions
looks like prim@ stuff does not work here (is it possibly not handled by rustdoc at all?)
04d9c37
to
b73eb9a
Compare
This is the second (and probably last major?) lint required for the never type fallback change.
The idea is to check if the code errors with
fallback = ()
and if it errors withfallback = !
and if it went from "ok" to "error", lint.I'm not happy with the diagnostic, ideally we'd highlight what bound is the problem. But I'm really unsure how to do that (cc @jackh726, iirc you had some ideas?)
r? @compiler-errors
Thanks @BoxyUwU with helping with trait solver stuff when I was implementing the initial version of this lint.
Tracking:
!
fall back to!
#123748