]> git.lizzy.rs Git - rust.git/commitdiff
Win some lose some; Unfortunately we lost recovery in one case.
authorMazdak Farrokhzad <twingoow@gmail.com>
Mon, 8 Jul 2019 13:35:56 +0000 (15:35 +0200)
committerMazdak Farrokhzad <twingoow@gmail.com>
Sun, 28 Jul 2019 04:53:39 +0000 (06:53 +0200)
src/test/ui/parser/recover-tuple-pat.rs
src/test/ui/parser/recover-tuple-pat.stderr

index 488e8db6b878979e11f42b7c1866f4ae838875d8..7fded752d675e2c005ca6719fa588b94b9d3c84b 100644 (file)
@@ -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) => {}
     }
 }
index 5919aa72355acd43ddea3cdcc5e90f10c1191d6c..93a6a66a63082ca3d2b99950e00447fd3c5f1ef0 100644 (file)
@@ -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[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
+error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0308`.