fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

1.40.0
530 B15 linesraw
1error[E0382]: use of moved value: `blk`
2  --> $DIR/once-cant-call-twice-on-heap.rs:9:5
3   |
4LL | 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
8LL |     blk();
9   |     --- value moved here
10LL |     blk();
11   |     ^^^ value used here after move
12
13error: aborting due to previous error
14
15For more information about this error, try `rustc --explain E0382`.