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

Add lint for 'toilet closures' #13545

Closed
wants to merge 1 commit into from

Conversation

GnomedDev
Copy link
Contributor

Closes #2523

This name is a little silly, but is also a widely used term and I don't think there is a funnier name we could use.

I feel like the discussion in that issue thread has come to a settle, with most people preferring drop to |_| () or suggesting those do not to implement their own fn ignore<T>(_: T) {} which would not fire this lint. It is also always possible to disagree with the agreed style of clippy with a simply allow attribute.

changelog: [toilet_closures]: Implemented lint for replacing |_| () with drop

@rustbot
Copy link
Collaborator

rustbot commented Oct 14, 2024

r? @blyxyas

rustbot has assigned @blyxyas.
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 Oct 14, 2024
@blyxyas
Copy link
Member

blyxyas commented Oct 14, 2024

Hi! I made a poll on Zulip as I'm not sure how to feel about this lint

We'll see what the team thinks =^w^=

@Manishearth
Copy link
Member

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.

Lint using |_| () instead of drop
4 participants