2019-04-22 02:40:08 -05:00
|
|
|
error[E0382]: borrow of moved value: `some_vec`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/tab_3.rs:7:20
|
2017-09-07 01:47:13 -05:00
|
|
|
|
|
2019-04-22 02:40:08 -05:00
|
|
|
LL | let some_vec = vec!["hi"];
|
|
|
|
| -------- move occurs because `some_vec` has type `std::vec::Vec<&str>`, which does not implement the `Copy` trait
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | some_vec.into_iter();
|
2020-06-11 12:48:46 -05:00
|
|
|
| ----------- `some_vec` moved due to this method call
|
2018-02-24 17:01:39 -06:00
|
|
|
LL | {
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | println!("{:?}", some_vec);
|
2019-04-22 02:40:08 -05:00
|
|
|
| ^^^^^^^^ value borrowed here after move
|
2020-06-11 12:48:46 -05:00
|
|
|
|
|
|
|
|
note: this function consumes the receiver `self` by taking ownership of it, which moves `some_vec`
|
|
|
|
--> $SRC_DIR/libcore/iter/traits/collect.rs:LL:COL
|
|
|
|
|
|
|
|
|
LL | fn into_iter(self) -> Self::IntoIter;
|
|
|
|
| ^^^^
|
2017-09-07 01:47:13 -05:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
2018-03-03 08:59:40 -06:00
|
|
|
For more information about this error, try `rustc --explain E0382`.
|