-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Future compat reports show confusing "lint level defined here" when there is an allow
#121009
Comments
Should probably be conditioned here on rust/compiler/rustc_middle/src/lint.rs Line 399 in fd9bb7f
@rustbot label -needs-triage +E-easy +A-diagnostics +D-confusing +T-compiler |
No, that doesn't sound right. This needs to be conditioned on whether the lint is being rendered for regular rustc output or for the future-breakage report. |
Indeed, it should instead be conditional on (Or at least that's my understanding after looking at the Cargo code as well) |
I was assuming the lint is rendered twice, once as a regular lint and once for the report. Maybe that's not true. So maybe the actual change that should happen is to skip |
Yes. And I don't the lint is "render" twice, when it is being emitted the emiter will add the lint to it's list and transmit it to Cargo.
This is also a possibility. Either would work. |
Do not point at `#[allow(_)]` as the reason for compat lint triggering Fix rust-lang#121009.
Rollup merge of rust-lang#121049 - estebank:issue-121009, r=fmease Do not point at `#[allow(_)]` as the reason for compat lint triggering Fix rust-lang#121009.
To reproduce, build any kind of code that triggers a future breakage report in a crate that
allow
s that warning. For instance:Build this with cargo, then run
cargo report future-incompatibilities --id 1
:That is quite confusing obviously, since it points at an
allow
lint level to justify a warning!It seems to me like these future compat reports shouldn't display that "lint level is defined here" at all, after all, their entire point is that they are not affected by the lint levels in the crate.
Cc @rust-lang/wg-diagnostics
The text was updated successfully, but these errors were encountered: