blob: 71a3c4506eaf2d8af9fca549a70612c3085d3d7d [file] [log] [blame]
error[E0382]: borrow of moved value: `x`
--> $DIR/moves-based-on-type-access-to-field.rs:11:12
|
LL | let x = vec!["hi".to_string()];
| - move occurs because `x` has type `std::vec::Vec<std::string::String>`, which does not implement the `Copy` trait
LL | consume(x.into_iter().next().unwrap());
| - value moved here
LL | touch(&x[0]);
| ^ value borrowed here after move
error: aborting due to previous error
For more information about this error, try `rustc --explain E0382`.