-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Fix needless_borrow
causing mutable borrows to be moved
#8217
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
Conversation
r? @camsteffen (rust-highfive has picked a reviewer for you, use r? to override) |
2c9f1c3
to
f48c0a8
Compare
This now includes all cases covered by |
I think we can remove/deprecate Tangentially, I noticed the other day that we don't lint |
I'm (very slowly) working on an explicit deref lint. It would fit in there whenever that's done. |
That successfully broke the changelog... Not really sure what to change there. |
You need to add |
That would mean |
|
The description for
The description for
Those describe exactly the same thing. o the point where anything covered by one and not he other would be a clear false negative. Given that renaming sound like the appropriate thing to do. |
Okay, good point. So I think you can just add |
1ad870e
to
cb7fe3e
Compare
I was trying to avoid editing the changelog, but I don't see any other option. |
One idea for the lint message but otherwise looks good. Please update "changelog" to include the lint rename and added functionality. |
4cda9ab
to
e94a2e7
Compare
Squash some commits then will merge! |
e94a2e7
to
ddc3caa
Compare
ddc3caa
to
5eae868
Compare
5eae868
to
c615140
Compare
@bors r+ |
📌 Commit c615140 has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
fixes #8191
changelog: Fix
needless_borrow
causing mutable borrows to be movedchangelog: Rename
ref_in_deref
toneedless_borrow
changelog: Suggest removing the borrow on method call receivers in
needless_borrow