1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
error[E0382]: use of moved value: `m`
--> $DIR/issue-53114-borrow-checks.rs:22:11
|
LL | let m = M;
| - move occurs because `m` has type `M`, which does not implement the `Copy` trait
LL | drop(m);
| - value moved here
LL | match m { _ => { } } // #53114: should eventually be accepted too
| ^ value used here after move
error[E0382]: use of partially moved value: `mm`
--> $DIR/issue-53114-borrow-checks.rs:27:11
|
LL | match mm { (_x, _) => { } }
| -- value partially moved here
LL | match mm { (_, _y) => { } }
| ^^ value used here after partial move
|
= note: partial move occurs because `mm.0` has type `M`, which does not implement the `Copy` trait
error[E0382]: use of partially moved value: `mm`
--> $DIR/issue-53114-borrow-checks.rs:29:11
|
LL | match mm { (_, _y) => { } }
| -- value partially moved here
LL |
LL | match mm { (_, _) => { } }
| ^^ value used here after partial move
|
= note: partial move occurs because `mm.1` has type `M`, which does not implement the `Copy` trait
error[E0382]: use of moved value: `m`
--> $DIR/issue-53114-borrow-checks.rs:36:16
|
LL | let m = M;
| - move occurs because `m` has type `M`, which does not implement the `Copy` trait
LL | drop(m);
| - value moved here
LL | if let _ = m { } // #53114: should eventually be accepted too
| ^ value used here after move
error[E0382]: use of partially moved value: `mm`
--> $DIR/issue-53114-borrow-checks.rs:41:22
|
LL | if let (_x, _) = mm { }
| -- value partially moved here
LL | if let (_, _y) = mm { }
| ^^ value used here after partial move
|
= note: partial move occurs because `mm.0` has type `M`, which does not implement the `Copy` trait
error[E0382]: use of partially moved value: `mm`
--> $DIR/issue-53114-borrow-checks.rs:43:21
|
LL | if let (_, _y) = mm { }
| -- value partially moved here
LL |
LL | if let (_, _) = mm { }
| ^^ value used here after partial move
|
= note: partial move occurs because `mm.1` has type `M`, which does not implement the `Copy` trait
error: aborting due to 6 previous errors
For more information about this error, try `rustc --explain E0382`.
|