Skip to content
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

suggest &mut for redundant FnMut closures #7437

Merged
merged 1 commit into from
Jul 14, 2021

Conversation

ebobrow
Copy link
Contributor

@ebobrow ebobrow commented Jul 5, 2021

fixes #6903

changelog: suggest &mut for redundant FnMut closures

Copy link
Member

@flip1995 flip1995 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is sufficient to fix all cases. I made some suggestion on how to improve this check.

clippy_lints/src/eta_reduction.rs Outdated Show resolved Hide resolved
clippy_lints/src/eta_reduction.rs Outdated Show resolved Hide resolved
@flip1995 flip1995 self-assigned this Jul 6, 2021
@flip1995 flip1995 added the S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) label Jul 6, 2021
@ebobrow ebobrow force-pushed the redundant-closure-move branch 2 times, most recently from a57d464 to ccc1da4 Compare July 7, 2021 15:18
@flip1995 flip1995 added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties and removed S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) labels Jul 8, 2021
Copy link
Member

@flip1995 flip1995 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more note.

clippy_utils/src/usage.rs Outdated Show resolved Hide resolved
@flip1995 flip1995 added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Jul 13, 2021
@ebobrow
Copy link
Contributor Author

ebobrow commented Jul 13, 2021

Thanks for the review! I think this should be better now. Sorry, I'm not sure how to change the label back to waiting-on-review.

@flip1995
Copy link
Member

No problem, it's

@rustbot label -S-waiting-on-author +S-waiting-on-review

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties and removed S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) labels Jul 14, 2021
Copy link
Member

@flip1995 flip1995 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 small things left. Those should really be the last before we can merge this.

clippy_utils/src/usage.rs Outdated Show resolved Hide resolved
tests/ui/eta.rs Show resolved Hide resolved
@flip1995 flip1995 added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Jul 14, 2021
@flip1995
Copy link
Member

@bors r+

Thanks!

@bors
Copy link
Collaborator

bors commented Jul 14, 2021

📌 Commit 4c398e0 has been approved by flip1995

@bors
Copy link
Collaborator

bors commented Jul 14, 2021

⌛ Testing commit 4c398e0 with merge 4acbff9...

@bors
Copy link
Collaborator

bors commented Jul 14, 2021

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: flip1995
Pushing 4acbff9 to master...

@bors bors merged commit 4acbff9 into rust-lang:master Jul 14, 2021
@ebobrow ebobrow deleted the redundant-closure-move branch July 14, 2021 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Redundant_closure false positive with moved FnMut
4 participants