summaryrefslogtreecommitdiffstats
path: root/tests/ui/moves/issue-75904-move-closure-loop.stderr
blob: 5e427a1fcdc7d77cbb704688066d22edd45f7f7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
error[E0382]: use of moved value: `a`
  --> $DIR/issue-75904-move-closure-loop.rs:10:9
   |
LL |     let mut a = NotCopy;
   |         ----- move occurs because `a` has type `NotCopy`, which does not implement the `Copy` trait
LL |     loop {
LL |         || {
   |         ^^ value moved into closure here, in previous iteration of loop
LL |             &mut a;
LL |             a;
   |             - use occurs due to use in closure

error: aborting due to previous error

For more information about this error, try `rustc --explain E0382`.