-
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
False positive on similar_names? #2651
Comments
@darnir That does look like a false positive, indeed. |
I think this might be the issue with spans not having expansion info since the last update. So this is actually occurring inside a derive |
@phansch: Here's the entire struct:
|
@darnir thanks! @oli-obk I guess you're correct: https://play.rust-lang.org/?gist=77d160aa9b7de5f0e132f4c65aa316d9&version=nightly It only triggers when the |
Looks like this is caused by rust-lang/rust#49154, which broke the macro check in some cases. |
Given how this is still a broken lint, how about adding it to the list of known problems EDIT: Just realized, I've been explicitly enabling it. |
The lint isn't broken, rustc is. If we disable this lint we could just as well disable all clippy lints, because all of them have this issue in some form or another ;) I'll try to find the root cause in rustc today. |
I am having this issue with structopt derives :/ I was confused at first but in hindsight it makes sense. |
Will probably be fixed with the next nightly. |
The
similar_names
lint seems to be very strict with what it considers "similar". For example, I just had clippy give me this warning:Sure, both of these fields are part of the same struct, but I don't see how
input
andcache_util
are similar or confusing looking variable names.The text was updated successfully, but these errors were encountered: