]> git.lizzy.rs Git - rust.git/blob - src/test/ui/unboxed-closures/unboxed-closures-infer-fnonce-call-twice.stderr
Auto merge of #54720 - davidtwco:issue-51191, r=nikomatsakis
[rust.git] / src / test / ui / unboxed-closures / unboxed-closures-infer-fnonce-call-twice.stderr
1 error[E0382]: use of moved value: `tick`
2   --> $DIR/unboxed-closures-infer-fnonce-call-twice.rs:20:5
3    |
4 LL |     tick();
5    |     ---- value moved here
6 LL |     tick(); //~ ERROR use of moved value: `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-call-twice.rs:18:29
11    |
12 LL |     let tick = || mem::drop(counter);
13    |                             ^^^^^^^
14
15 error: aborting due to previous error
16
17 For more information about this error, try `rustc --explain E0382`.