-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Unused variables suggest _prefix
for patterns with ref
bindings when _
wildcard would suffice
#59153
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
Comments
EDIT: Or maybe not, ignore me. |
It's very similar. It'll probably be fixed by the same code. |
This may cause a "can't move out from
It's longer and noisier, why is this better than |
Longer, noisier, and invalid: playground The only thing I can think of that is actually valid code that looks like that in this context is but like @petrochenkov , I do not see why one would suggest that over |
Or maybe the intent is to suggest |
In any case, if we are indeed talking about tuple-structs, I don't see how the given suggestion as implemented is "incorrect." It may not be ideal (if I'm right that |
ref
bindings_prefix
for patterns with ref
bindings when _
wildcard would suffice
This is what I get for creating tickets sleep deprived. I misread the error as having the problem in #54180. We can close this one. |
The correct suggestion is either to remove the
ref e
and supply_e
or to change the code toref e: _
.The text was updated successfully, but these errors were encountered: