-
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
Register redundant_field_names and non_expressive_names as early passes #5651
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
Thanks for finishing this! The lint triggering in the if_chain is because the variables don't come from an expansion, but are written by the user. It's like they are macro arguments in e.g. @bors r+ |
📌 Commit 4161823 has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
@Mark-Simulacrum if the 1.44.1 window is still open, it might be worth backporting this to fix a stable-stable regression. |
@rust-lang/clippy we do have time to rebuild artifacts, but I don't know enough here to be able to say whether it's worth it or not. If we feel it is, could someone prepare a 1.44.1 branch on the clippy repository that we can checkout on rust-lang/rust's stable branch? (subtree has not yet hit rust-lang/rust stable). |
Today was another issue opened about this, so I would say, that it would be worth it, if possible. I try to push a working commit to a |
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