rust/src/test/ui/issues/issue-17385.stderr

25 lines
778 B
Plaintext
Raw Normal View History

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