]> git.lizzy.rs Git - rust.git/blob - src/test/ui/once-cant-call-twice-on-heap.nll.stderr
Auto merge of #60072 - RalfJung:linked-list, r=shepmaster
[rust.git] / src / test / ui / once-cant-call-twice-on-heap.nll.stderr
1 error[E0382]: use of moved value: `blk`
2   --> $DIR/once-cant-call-twice-on-heap.rs:9:5
3    |
4 LL | fn foo<F:FnOnce()>(blk: F) {
5    |        -           --- move occurs because `blk` has type `F`, which does not implement the `Copy` trait
6    |        |
7    |        consider adding a `Copy` constraint to this type argument
8 LL |     blk();
9    |     --- value moved here
10 LL |     blk();
11    |     ^^^ value used here after move
12
13 error: aborting due to previous error
14
15 For more information about this error, try `rustc --explain E0382`.