rust/tests/ui/issues/issue-17385.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
1.2 KiB
Plaintext
Raw Normal View History

2018-07-15 21:11:54 +00:00
error[E0382]: use of moved value: `foo`
--> $DIR/issue-17385.rs:18:5
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 {
| ^^^^^^^^^ value used here after move
|
note: if `X` implemented `Clone`, you could clone the value
--> $DIR/issue-17385.rs:1:1
|
LL | struct X(isize);
| ^^^^^^^^ consider implementing `Clone` for this type
...
LL | drop(foo);
| --- you could clone this value
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
|
note: if `Enum` implemented `Clone`, you could clone the value
--> $DIR/issue-17385.rs:3:1
|
LL | enum Enum {
| ^^^^^^^^^ consider implementing `Clone` for this type
...
LL | drop(e);
| - you could clone this value
2018-07-15 21:11:54 +00:00
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0382`.