-
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
Fix all occurences needless_borrow
internally
#6931
Conversation
r? @phansch (rust-highfive has picked a reviewer for you, use r? to override) |
needless_borrow
from the nursery. The bug that moved it there …needless_borrow
from the nursery.
@Jarcho Did you happen to run I'm currently a bit hesitant to merge this because it caused so many changes in our codebase alone. |
☔ The latest upstream changes (presumably #6896) made this pull request unmergeable. Please resolve the merge conflicts. |
Not bad overall
Pretty much every instance in clippy is from taking a reference to a HIR node. Those are mostly all references to start with. |
☔ The latest upstream changes (presumably #6957) made this pull request unmergeable. Please resolve the merge conflicts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes LGTM and I would merge them like this after a rebase.
But I would do the actual move of the lint in another PR. That PR should then add tests for the remaining open issues about this lint to verify that they're fixed or to at least know the state this lint is in.
This is a great code cleanup btw! Thanks for all the work you put into this! |
I'll pull out the category change when I rebase it. There's still the bad suggestion with pattern references to deal with. The rest of those are just enhancements. |
needless_borrow
from the nursery.needless_borrow
internally
☔ The latest upstream changes (presumably #7027) made this pull request unmergeable. Please resolve the merge conflicts. |
☔ The latest upstream changes (presumably #6463) made this pull request unmergeable. Please resolve the merge conflicts. |
✌️ @Jarcho can now approve this pull request |
@bors r=phansch,flip1995 Thanks! |
📌 Commit 12fce55 has been approved by |
Looks like you got to it before me. |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
The bug that got 'needless_borrow' moved into the nursery was fixed two years ago in d4370f8.
This did trigger over a thousand times internally, so that's all the other changes. I vetted most of them, but there's a lot The only interesting change is to the lint list.
declare_tool_lint
already makes a reference, so there's no need to take a reference to the lints.changelog: None