]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.stderr
Update tests for changes to cannot move errors
[rust.git] / src / test / ui / borrowck / unboxed-closures-move-upvar-from-non-once-ref-closure.stderr
1 error[E0507]: cannot move out of `y`, a captured variable in an `Fn` closure
2   --> $DIR/unboxed-closures-move-upvar-from-non-once-ref-closure.rs:11:9
3    |
4 LL |     let y = vec![format!("World")];
5    |         - captured outer variable
6 LL |     call(|| {
7 LL |         y.into_iter();
8    |         ^ move occurs because `y` has type `std::vec::Vec<std::string::String>`, which does not implement the `Copy` trait
9
10 error: aborting due to previous error
11
12 For more information about this error, try `rustc --explain E0507`.