-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Diagnostic when using moved value in loop{} could be clearer #31874
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
Comments
huonw
changed the title
Diagnostic when using moved value in loop{} may be metter
Diagnostic when using moved value in loop{} could be clearer
Feb 25, 2016
How about:
Special-casing loops seems hard to do, but this might be enough to clarify what's going on. |
Duplicate of #10876. |
This was fixed in 5b150cf. |
Fixed? The error message is the same modulo formatting. Testing it again - the moveck error message mentions "previous iteration", but not the borrowck. |
Closing the moveck issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Consider this error message:
It look more or less clear. But if we move and try to use on the same line:
the diagnostic looks less clear:
Note the absence of filename and line number.
Maybe it should point to the same line
<anon>:6
or there should dedicated message mentioning the loop...The text was updated successfully, but these errors were encountered: