]> git.lizzy.rs Git - rust.git/blob - tests/ui/moves/issue-75904-move-closure-loop.stderr
Rollup merge of #107576 - P1n3appl3:master, r=tmandry
[rust.git] / tests / ui / moves / issue-75904-move-closure-loop.stderr
1 error[E0382]: use of moved value: `a`
2   --> $DIR/issue-75904-move-closure-loop.rs:10:9
3    |
4 LL |     let mut a = NotCopy;
5    |         ----- move occurs because `a` has type `NotCopy`, which does not implement the `Copy` trait
6 LL |     loop {
7 LL |         || {
8    |         ^^ value moved into closure here, in previous iteration of loop
9 LL |             &mut a;
10 LL |             a;
11    |             - use occurs due to use in closure
12
13 error: aborting due to previous error
14
15 For more information about this error, try `rustc --explain E0382`.