fork/rust

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

borsAuto merge of #71365 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4fb7144ed15

1.43.0
621 B19 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
6LL |     blk();
7   |     --- value moved here
8LL |     blk();
9   |     ^^^ value used here after move
10   |
11help: consider further restricting this bound with `+ Copy`
12  --> $DIR/once-cant-call-twice-on-heap.rs:7:10
13   |
14LL | fn foo<F:FnOnce()>(blk: F) {
15   |          ^^^^^^^^
16
17error: aborting due to previous error
18
19For more information about this error, try `rustc --explain E0382`.