]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | error[E0382]: use of moved value: `tick` |
0731742a | 2 | --> $DIR/unboxed-closures-infer-fnonce-move-call-twice.rs:10:5 |
b7449926 XL |
3 | | |
4 | LL | tick(); | |
f035d41b | 5 | | ------ `tick` moved due to this call |
532ac7d7 | 6 | LL | tick(); |
b7449926 XL |
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 | |
0731742a | 10 | --> $DIR/unboxed-closures-infer-fnonce-move-call-twice.rs:8:34 |
b7449926 XL |
11 | | |
12 | LL | let tick = move || mem::drop(counter); | |
13 | | ^^^^^^^ | |
f035d41b XL |
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 | | ^^^^ | |
b7449926 XL |
19 | |
20 | error: aborting due to previous error | |
21 | ||
22 | For more information about this error, try `rustc --explain E0382`. |