2018-08-08 14:28:26 +02:00
|
|
|
error[E0382]: use of moved value: `x`
|
2018-12-25 16:56:47 +01:00
|
|
|
--> $DIR/ref-suggestion.rs:4:5
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2019-04-22 09:40:08 +02:00
|
|
|
LL | let x = vec![1];
|
2020-09-02 09:40:56 +02:00
|
|
|
| - move occurs because `x` has type `Vec<i32>`, which does not implement the `Copy` trait
|
2018-08-08 14:28:26 +02:00
|
|
|
LL | let y = x;
|
2019-04-22 09:40:08 +02:00
|
|
|
| - value moved here
|
2019-03-09 13:03:44 +01:00
|
|
|
LL | x;
|
2018-08-08 14:28:26 +02:00
|
|
|
| ^ value used here after move
|
|
|
|
|
|
|
|
error[E0382]: use of moved value: `x`
|
2018-12-25 16:56:47 +01:00
|
|
|
--> $DIR/ref-suggestion.rs:8:5
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2019-04-22 09:40:08 +02:00
|
|
|
LL | let x = vec![1];
|
2020-09-02 09:40:56 +02:00
|
|
|
| - move occurs because `x` has type `Vec<i32>`, which does not implement the `Copy` trait
|
2018-08-08 14:28:26 +02:00
|
|
|
LL | let mut y = x;
|
2019-04-22 09:40:08 +02:00
|
|
|
| - value moved here
|
2019-03-09 13:03:44 +01:00
|
|
|
LL | x;
|
2018-08-08 14:28:26 +02:00
|
|
|
| ^ value used here after move
|
|
|
|
|
2020-08-08 19:16:43 +02:00
|
|
|
error[E0382]: use of partially moved value: `x`
|
2018-12-25 16:56:47 +01:00
|
|
|
--> $DIR/ref-suggestion.rs:16:5
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
LL | (Some(y), ()) => {},
|
2020-08-08 19:16:43 +02:00
|
|
|
| - value partially moved here
|
2018-08-08 14:28:26 +02:00
|
|
|
...
|
2019-03-09 13:03:44 +01:00
|
|
|
LL | x;
|
2019-04-22 09:40:08 +02:00
|
|
|
| ^ value used here after partial move
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2020-09-02 09:40:56 +02:00
|
|
|
= note: partial move occurs because value has type `Vec<i32>`, which does not implement the `Copy` trait
|
2020-06-20 07:45:09 +02:00
|
|
|
help: borrow this field in the pattern to avoid moving `x.0.0`
|
|
|
|
|
|
|
|
|
LL | (Some(ref y), ()) => {},
|
|
|
|
| ^^^
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0382`.
|