2020-09-10 22:41:02 -05:00
|
|
|
error[E0382]: use of moved value: `c`
|
|
|
|
--> $DIR/closure-print-generic-1.rs:17:5
|
|
|
|
|
|
|
|
|
LL | let c = to_fn_once(move || {
|
2023-09-09 01:36:50 -05:00
|
|
|
| - move occurs because `c` has type `{closure@$DIR/closure-print-generic-1.rs:12:24: 12:31}`, which does not implement the `Copy` trait
|
2020-09-10 22:41:02 -05:00
|
|
|
...
|
|
|
|
LL | c();
|
|
|
|
| --- `c` moved due to this call
|
|
|
|
LL | c();
|
|
|
|
| ^ value used here after move
|
|
|
|
|
|
|
|
|
note: this value implements `FnOnce`, which causes it to be moved when called
|
|
|
|
--> $DIR/closure-print-generic-1.rs:16:5
|
|
|
|
|
|
|
|
|
LL | c();
|
|
|
|
| ^
|
|
|
|
|
2023-11-21 09:44:16 -06:00
|
|
|
error: aborting due to 1 previous error
|
2020-09-10 22:41:02 -05:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0382`.
|