]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/not-copy-closure.nll.stderr
Rollup merge of #57132 - daxpedda:master, r=steveklabnik
[rust.git] / src / test / ui / not-copy-closure.nll.stderr
index 2f295315a08aa64eafb354389ab13e421423786d..1a65bcf4473172300f6cb0cd572874b42f209005 100644 (file)
@@ -5,6 +5,12 @@ LL |     let b = hello;
    |             ----- value moved here
 LL |     let c = hello; //~ ERROR use of moved value: `hello` [E0382]
    |             ^^^^^ value used here after move
+   |
+note: closure cannot be moved more than once as it is not `Copy` due to moving the variable `a` out of its environment
+  --> $DIR/not-copy-closure.rs:6:9
+   |
+LL |         a += 1;
+   |         ^
 
 error: aborting due to previous error