Incorrect 'use occurs' note when value is moved into a closure inside a loop #75904
Labels
A-borrow-checker
Area: The borrow checker
A-closures
Area: Closures (`|…| { … }`)
A-diagnostics
Area: Messages for errors, warnings, and lints
C-bug
Category: This is a bug.
D-incorrect
Diagnostics: A diagnostic that is giving misleading or incorrect information.
Uh oh!
There was an error while loading. Please reload this page.
The following code:
produces the following error:
However, the
&mut a;
statement is not responsible for the move - it's thea;
statement below it which causes the move.Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: