-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
use_self still gives false positives #6902
Comments
This issue would be automatically fixed when rust-lang/rust#84122 is addressed. |
For reference, here are two cases in which the same false positive occurs:
|
This problem has now made it to the clippy that's in beta (specifically Here's a reproduction, this project has 0 warnings with the clippy with Rust 1.60 but has warnings with the clippy with 1.61.0-beta.1: Cargo.toml:
src/lib.rs:
warning:
which does contain the repetition in the |
I can reproduce this as well. Shouldn't clippy not apply this lint (and others) on impls and functions marked as |
Now it fires on stable 😭 |
This fixes the CI after the upgrade to Rust 1.61. I had to "allow" the `use_self` lint, due to rust-lang/rust-clippy#8845 and rust-lang/rust-clippy#6902. It removed some false negatives, though, so I fixed some of the usage.
This fixes the CI after the upgrade to Rust 1.61. I had to "allow" the `use_self` lint, due to rust-lang/rust-clippy#8845 and rust-lang/rust-clippy#6902. It removed some false negatives, though, so I fixed some of the usage.
The |
I believe this should now be fixable with the help of #8694. |
This fixes the CI after the upgrade to Rust 1.61. I had to "allow" the `use_self` lint, due to rust-lang/rust-clippy#8845 and rust-lang/rust-clippy#6902. It removed some false negatives, though, so I fixed some of the usage.
Now that #6818 is fixed and the fix (#6833) has made its way to the nightly there are still cases of false positives:
Lint name:
use_self
I tried this code:
I expected to see this happen: clippy clean - no warning/errors
Instead, this happened:
Interestingly enough it the code generated by
#[serde(untagged)]
that triggers this lint. If this line is commented out then clippy seems to be happyMeta
cargo clippy -V
:clippy 0.1.52 (2021-03-13 acca818)
rustc -Vv
:The text was updated successfully, but these errors were encountered: