-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Clippy warns twice about unknown lints #6602
Comments
This is not a Clippy issue, but a rustc issue in general. This happens when linting attributes. Somehow rustc diagnostics doesn't realize, that this warning was already emitted and emits it again. rustc diagnostics has code that hashes warnings/errors, to make sure that they are not emitted twice, which for some reason fails for attributes (for the first attribute linted). |
@flip1995 this issue doesn't happen with rustdoc:
The issue may be caused by rustc, but it's specific to clippy. |
This may be true, but rustdoc still only emits one lint even with |
Oh, I see. So Clippy's lint machinery somehow breaks rustc's diagnostics 🤔 |
I label it as |
Fix duplicate unknown lint errors Fixes rust-lang#6602
I tried this code:
I expected to see this happen: Clippy warns once that
x
is an unknown lint.Instead, this happened: Clippy warns twice.
Meta
cargo clippy -V
: 0.1.51 (2021-01-16 8a65184)rustc -V
: 1.49.0See also rust-lang/rust#80524 (comment) - this looks unrelated to the
UNKNOWN_CLIPPY_LINTS
pass because it shows up even with that disabled.cc @flip1995
The text was updated successfully, but these errors were encountered: