Skip to content

fix: redundant_closure_call lint for closures with block #15144

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

Merged
merged 1 commit into from
Jul 6, 2025

Conversation

odysa
Copy link
Contributor

@odysa odysa commented Jun 26, 2025

Fixes #9583

When a closure with no parameters is called immediately after being defined, clippy can now suggest replacing the entire expression with just the closure's body.


changelog: [redundant_closure_call]: add fixes for closures with block

@odysa odysa changed the title fix: redudant closure broken fix fix: redundant_closure_call lint for closures with block Jun 26, 2025
@odysa odysa marked this pull request as ready for review June 26, 2025 23:18
@rustbot
Copy link
Collaborator

rustbot commented Jun 26, 2025

r? @llogiq

rustbot has assigned @llogiq.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jun 26, 2025
@llogiq
Copy link
Contributor

llogiq commented Jul 6, 2025

Looks good to me.

@llogiq llogiq added this pull request to the merge queue Jul 6, 2025
Merged via the queue into rust-lang:master with commit 2713c50 Jul 6, 2025
19 of 21 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jul 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cargo clippy --fix generated broken code
3 participants