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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

odysa
Copy link

@odysa odysa commented Jun 26, 2025

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

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.

@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cargo clippy --fix generated broken code
3 participants