-
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
Strange behavior from similar_names
in most recent clippy version
#2927
Comments
I think this is similar to #2651. The span is wrong and the suggestion makes it look like it tries to match on some macro expansion somewhere. This might be fixed by rust-lang/rust#52467, and I will try to reproduce it once that's merged. |
I am also encountering strange error messages. Here's one:
Clearly, it's either thinking |
Still happening with the newest nightly: #3050 |
🎉 |
Register redundant_field_names and non_expressive_names as early passes Similar names was moved to a pre-expansion pass to solve #2927, so I'm avoiding linting on code from expansion, which makes the dogfood (mostly, see below) pass. I had to change new_without_default though, and although I understand why it was not triggering before, TBH I don't see why the binding inside the nested `if_chain` is being linted now. Any ideas? (it seems legit though as the code can be changed by the user) changelog: Register redundant_field_names and non_expressive_names as early passes Fixes #5356 Fixes #5521
I'm updating Diesel to the most recent nightly for our tests. This issue occurred with
rustup component add clippy-preview
on the most recent nightly (rustc 1.29.0-nightly (1ecf6929d 2018-07-16)
).When running
cargo clippy
on our code base, I receive the following error:The first point of note is that it doesn't seem to be pointing to the line that is causing the error, the only span it's showing is in the
note
section for the existing binding. The second problem is that it's just pointing to the same line multiple times. There is no binding in scope at all close toargs
other than that one, so it seems to think that the name is too similar to itself.The text was updated successfully, but these errors were encountered: