]> git.proxmox.com Git - rustc.git/blob - src/test/ui/once-cant-call-twice-on-heap.stderr
New upstream version 1.44.1+dfsg1
[rustc.git] / src / test / ui / once-cant-call-twice-on-heap.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 LL | blk();
7 | --- value moved here
8 LL | blk();
9 | ^^^ value used here after move
10 |
11 help: consider further restricting this bound
12 |
13 LL | fn foo<F:FnOnce() + Copy>(blk: F) {
14 | ^^^^^^
15
16 error: aborting due to previous error
17
18 For more information about this error, try `rustc --explain E0382`.