-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Warn on leading pipes in patterns #10717
Comments
@rustbot claim |
Covered by Should be closed? |
Yeah, no need for a lint if rustfmt has it covered |
I think we still might lint this in a So I think we may reopen this, but it's certainly no longer an easy issue. |
There's an open PR on the rustfmt side to fix the |
Ah, I had overlooked that. In that case, it's probably not a good idea to invest in this. |
What it does
Warns on a
|x| x
pattern, which looks like a closure.Lint Name
pattern_leading_pipe
Category
suspicious
Advantage
Drawbacks
None
Example
(borrowed from weird-exprs.rs)
Could be written as:
The text was updated successfully, but these errors were encountered: