2018-07-15 16:11:54 -05:00
|
|
|
error[E0382]: use of moved value: `foo`
|
2019-04-22 02:40:08 -05:00
|
|
|
--> $DIR/issue-17385.rs:19:11
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
2019-04-22 02:40:08 -05:00
|
|
|
LL | let foo = X(1);
|
|
|
|
| --- move occurs because `foo` has type `X`, which does not implement the `Copy` trait
|
2018-07-15 16:11:54 -05:00
|
|
|
LL | drop(foo);
|
|
|
|
| --- value moved here
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | match foo {
|
2019-04-22 02:40:08 -05:00
|
|
|
LL | X(1) => (),
|
|
|
|
| ^ value used here after move
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
|
|
error[E0382]: use of moved value: `e`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/issue-17385.rs:25:11
|
2018-07-15 16:11:54 -05:00
|
|
|
|
|
2019-04-22 02:40:08 -05:00
|
|
|
LL | let e = Enum::Variant2;
|
|
|
|
| - move occurs because `e` has type `Enum`, which does not implement the `Copy` trait
|
2018-07-15 16:11:54 -05:00
|
|
|
LL | drop(e);
|
|
|
|
| - value moved here
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | match e {
|
2018-07-15 16:11:54 -05:00
|
|
|
| ^ value used here after move
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0382`.
|