mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
Win some lose some; Unfortunately we lost recovery in one case.
This commit is contained in:
parent
e3cdadd73f
commit
7c0b1da2c1
@ -1,12 +1,12 @@
|
||||
// NOTE: This doesn't recover anymore.
|
||||
|
||||
fn main() {
|
||||
let x = (1, 2, 3, 4);
|
||||
match x {
|
||||
(1, .., 4) => {}
|
||||
(1, .=., 4) => { let _: usize = ""; }
|
||||
//~^ ERROR expected pattern, found `.`
|
||||
//~| ERROR mismatched types
|
||||
(.=., 4) => {}
|
||||
//~^ ERROR expected pattern, found `.`
|
||||
(1, 2, 3, 4) => {}
|
||||
}
|
||||
}
|
||||
|
@ -1,24 +1,8 @@
|
||||
error: expected pattern, found `.`
|
||||
--> $DIR/recover-tuple-pat.rs:5:13
|
||||
--> $DIR/recover-tuple-pat.rs:7:13
|
||||
|
|
||||
LL | (1, .=., 4) => { let _: usize = ""; }
|
||||
| ^ expected pattern
|
||||
|
||||
error: expected pattern, found `.`
|
||||
--> $DIR/recover-tuple-pat.rs:8:10
|
||||
|
|
||||
LL | (.=., 4) => {}
|
||||
| ^ expected pattern
|
||||
error: aborting due to previous error
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/recover-tuple-pat.rs:5:41
|
||||
|
|
||||
LL | (1, .=., 4) => { let _: usize = ""; }
|
||||
| ^^ expected usize, found reference
|
||||
|
|
||||
= note: expected type `usize`
|
||||
found type `&'static str`
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0308`.
|
||||
|
Loading…
Reference in New Issue
Block a user