Skip to content

Commit 2e6e6a9

Browse files
committed
Win some lose some; Unfortunately we lost recovery in one case.
1 parent 7cd4144 commit 2e6e6a9

File tree

2 files changed

+4
-20
lines changed

2 files changed

+4
-20
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1+
// NOTE: This doesn't recover anymore.
2+
13
fn main() {
24
let x = (1, 2, 3, 4);
35
match x {
46
(1, .., 4) => {}
57
(1, .=., 4) => { let _: usize = ""; }
68
//~^ ERROR expected pattern, found `.`
7-
//~| ERROR mismatched types
89
(.=., 4) => {}
9-
//~^ ERROR expected pattern, found `.`
1010
(1, 2, 3, 4) => {}
1111
}
1212
}
Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,8 @@
11
error: expected pattern, found `.`
2-
--> $DIR/recover-tuple-pat.rs:5:13
2+
--> $DIR/recover-tuple-pat.rs:7:13
33
|
44
LL | (1, .=., 4) => { let _: usize = ""; }
55
| ^ expected pattern
66

7-
error: expected pattern, found `.`
8-
--> $DIR/recover-tuple-pat.rs:8:10
9-
|
10-
LL | (.=., 4) => {}
11-
| ^ expected pattern
12-
13-
error[E0308]: mismatched types
14-
--> $DIR/recover-tuple-pat.rs:5:41
15-
|
16-
LL | (1, .=., 4) => { let _: usize = ""; }
17-
| ^^ expected usize, found reference
18-
|
19-
= note: expected type `usize`
20-
found type `&'static str`
21-
22-
error: aborting due to 3 previous errors
7+
error: aborting due to previous error
238

24-
For more information about this error, try `rustc --explain E0308`.

0 commit comments

Comments
 (0)