-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
New lint: wildcard pattern in let #4090
Comments
One use case is to prevent warnings on let _ = returning_result_i_dont_want_to_deal_with() But this could be implemented as a restriction lint. |
We could specifically lint on known guard types |
Many known guards (like Indeed I forgot that Two ideas that don't work:
|
i feel like this makes a decent restriction lint. |
@rustbot claim |
|
yes, that was my point. this lint (once implemented) would be mainly useful in conjunction with i have a partial implementation of this, and i successfully registered the lint.. but for some reason it never produces any output, not even debug prints? |
To add a new lint, using |
I think there should be a warning about the wildcard pattern in let.
I can't imagine any situation where this makes sense, and there are cases where it's a mistake caused by taking
_
for identifier though it's not.Wrong:
Correct:
The text was updated successfully, but these errors were encountered: