]> git.proxmox.com Git - rustc.git/blob - src/test/ui/unboxed-closures/unboxed-closures-infer-fnonce-move-call-twice.stderr
Update unsuspicious file list
[rustc.git] / src / test / ui / unboxed-closures / unboxed-closures-infer-fnonce-move-call-twice.stderr
1 error[E0382]: use of moved value: `tick`
2 --> $DIR/unboxed-closures-infer-fnonce-move-call-twice.rs:10:5
3 |
4 LL | tick();
5 | ------ `tick` moved due to this call
6 LL | tick();
7 | ^^^^ value used here after move
8 |
9 note: closure cannot be invoked more than once because it moves the variable `counter` out of its environment
10 --> $DIR/unboxed-closures-infer-fnonce-move-call-twice.rs:8:34
11 |
12 LL | let tick = move || mem::drop(counter);
13 | ^^^^^^^
14 note: this value implements `FnOnce`, which causes it to be moved when called
15 --> $DIR/unboxed-closures-infer-fnonce-move-call-twice.rs:9:5
16 |
17 LL | tick();
18 | ^^^^
19
20 error: aborting due to previous error
21
22 For more information about this error, try `rustc --explain E0382`.