2018-08-08 14:28:26 +02:00
|
|
|
error[E0382]: use of moved value: `blk`
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/once-cant-call-twice-on-heap.rs:9:5
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2019-04-22 08:40:08 +01:00
|
|
|
LL | fn foo<F:FnOnce()>(blk: F) {
|
|
|
|
| - --- move occurs because `blk` has type `F`, which does not implement the `Copy` trait
|
|
|
|
| |
|
|
|
|
| consider adding a `Copy` constraint to this type argument
|
2018-08-08 14:28:26 +02:00
|
|
|
LL | blk();
|
|
|
|
| --- value moved here
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | blk();
|
2018-08-08 14:28:26 +02:00
|
|
|
| ^^^ value used here after move
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0382`.
|