]> git.proxmox.com Git - rustc.git/blame - src/test/ui/unboxed-closures/unboxed-closures-infer-fnonce-move-call-twice.stderr
New upstream version 1.46.0~beta.2+dfsg1
[rustc.git] / src / test / ui / unboxed-closures / unboxed-closures-infer-fnonce-move-call-twice.stderr
CommitLineData
b7449926 1error[E0382]: use of moved value: `tick`
0731742a 2 --> $DIR/unboxed-closures-infer-fnonce-move-call-twice.rs:10:5
b7449926
XL
3 |
4LL | tick();
f035d41b 5 | ------ `tick` moved due to this call
532ac7d7 6LL | tick();
b7449926
XL
7 | ^^^^ value used here after move
8 |
9note: closure cannot be invoked more than once because it moves the variable `counter` out of its environment
0731742a 10 --> $DIR/unboxed-closures-infer-fnonce-move-call-twice.rs:8:34
b7449926
XL
11 |
12LL | let tick = move || mem::drop(counter);
13 | ^^^^^^^
f035d41b
XL
14note: 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 |
17LL | tick();
18 | ^^^^
b7449926
XL
19
20error: aborting due to previous error
21
22For more information about this error, try `rustc --explain E0382`.