1 error[E0382]: borrow of moved value: `x`
2 --> $DIR/moves-based-on-type-access-to-field.rs:11:12
4 LL | let x = vec!["hi".to_string()];
5 | - move occurs because `x` has type `Vec<String>`, which does not implement the `Copy` trait
6 LL | consume(x.into_iter().next().unwrap());
7 | ----------- `x` moved due to this method call
9 | ^ value borrowed here after move
11 note: `into_iter` takes ownership of the receiver `self`, which moves `x`
12 --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
13 help: you can `clone` the value and consume it, but this might not be your desired behavior
15 LL | consume(x.clone().into_iter().next().unwrap());
18 error: aborting due to previous error
20 For more information about this error, try `rustc --explain E0382`.