Unheplful Borrow Error Related to Use of Borrows in Loop #124181
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
Rationale and extra context
I encountered this issue in a real project where the binding equivalent to
nya
was very far away from the use, and i was usingcat
immutably above the==
(but didn't recognize it as immutable), which led me to believe that the use ofcat
was not the issue. Really I think this just needs a note about the fact that the uses are in a loop, so they are both used before and after each other.Rust Version
The text was updated successfully, but these errors were encountered: