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