rust/src/test/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.stderr

13 lines
454 B
Plaintext
Raw Normal View History

error[E0507]: cannot move out of captured variable in an `Fn` closure
2018-12-25 15:56:47 +00:00
--> $DIR/unboxed-closures-move-upvar-from-non-once-ref-closure.rs:11:9
2017-04-25 03:25:30 +00:00
|
2018-02-23 00:42:32 +00:00
LL | let y = vec![format!("World")];
2017-04-25 03:25:30 +00:00
| - captured outer variable
2018-02-24 23:01:39 +00:00
LL | call(|| {
2018-02-23 00:42:32 +00:00
LL | y.into_iter();
| ^ cannot move out of captured variable in an `Fn` closure
2017-04-25 03:25:30 +00:00
error: aborting due to previous error
2017-04-25 03:25:30 +00:00
2018-03-03 14:59:40 +00:00
For more information about this error, try `rustc --explain E0507`.