1
1
error[E0382]: use of moved value: `foo`
2
- --> $DIR/issue-17385.rs:28:5
2
+ --> $DIR/issue-17385.rs:28:11
3
3
|
4
- LL | drop(foo);
5
- | --- value moved here
6
- LL | / match foo { //~ ERROR use of moved value
7
- LL | | X(1) => (),
8
- LL | | _ => unreachable!()
9
- LL | | }
10
- | |_____^ value used here after move
4
+ LL | drop(foo);
5
+ | --- value moved here
6
+ LL | match foo { //~ ERROR use of moved value
7
+ | ^^^ value used here after move
11
8
|
12
9
= note: move occurs because `foo` has type `X`, which does not implement the `Copy` trait
13
10
14
11
error[E0382]: borrow of moved value: `foo`
15
- --> $DIR/issue-17385.rs:28:5
12
+ --> $DIR/issue-17385.rs:28:11
16
13
|
17
- LL | drop(foo);
18
- | --- value moved here
19
- LL | / match foo { //~ ERROR use of moved value
20
- LL | | X(1) => (),
21
- LL | | _ => unreachable!()
22
- LL | | }
23
- | |_____^ value borrowed here after move
14
+ LL | drop(foo);
15
+ | --- value moved here
16
+ LL | match foo { //~ ERROR use of moved value
17
+ | ^^^ value borrowed here after move
24
18
|
25
19
= note: move occurs because `foo` has type `X`, which does not implement the `Copy` trait
26
20
@@ -36,28 +30,22 @@ LL | X(1) => (),
36
30
= note: move occurs because `foo` has type `X`, which does not implement the `Copy` trait
37
31
38
32
error[E0382]: use of moved value: `e`
39
- --> $DIR/issue-17385.rs:35:5
33
+ --> $DIR/issue-17385.rs:35:11
40
34
|
41
- LL | drop(e);
42
- | - value moved here
43
- LL | / match e { //~ ERROR use of moved value
44
- LL | | Enum::Variant1 => unreachable!(),
45
- LL | | Enum::Variant2 => ()
46
- LL | | }
47
- | |_____^ value used here after move
35
+ LL | drop(e);
36
+ | - value moved here
37
+ LL | match e { //~ ERROR use of moved value
38
+ | ^ value used here after move
48
39
|
49
40
= note: move occurs because `e` has type `Enum`, which does not implement the `Copy` trait
50
41
51
42
error[E0382]: borrow of moved value: `e`
52
- --> $DIR/issue-17385.rs:35:5
43
+ --> $DIR/issue-17385.rs:35:11
53
44
|
54
- LL | drop(e);
55
- | - value moved here
56
- LL | / match e { //~ ERROR use of moved value
57
- LL | | Enum::Variant1 => unreachable!(),
58
- LL | | Enum::Variant2 => ()
59
- LL | | }
60
- | |_____^ value borrowed here after move
45
+ LL | drop(e);
46
+ | - value moved here
47
+ LL | match e { //~ ERROR use of moved value
48
+ | ^ value borrowed here after move
61
49
|
62
50
= note: move occurs because `e` has type `Enum`, which does not implement the `Copy` trait
63
51
0 commit comments