summary refs log tree commit diff
path: root/src/test/ui/parser
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-07-09 08:44:56 +0200
committerMazdak Farrokhzad <twingoow@gmail.com>2019-07-28 06:53:38 +0200
commitf6c8234f9f7495310a37c2e1dadc951d268143da (patch)
treebd58bc4214341281e5cf3bc1a04c15afe8c36548 /src/test/ui/parser
parent2411134c78706c1bb852da2fba4d90567ce4a5f3 (diff)
downloadrust-f6c8234f9f7495310a37c2e1dadc951d268143da.tar.gz
rust-f6c8234f9f7495310a37c2e1dadc951d268143da.zip
And also --bless those recovery tests.
Diffstat (limited to 'src/test/ui/parser')
-rw-r--r--src/test/ui/parser/pat-tuple-4.stderr38
-rw-r--r--src/test/ui/parser/pat-tuple-5.stderr40
2 files changed, 71 insertions, 7 deletions
diff --git a/src/test/ui/parser/pat-tuple-4.stderr b/src/test/ui/parser/pat-tuple-4.stderr
index 26b92fae313..2e1c167b871 100644
--- a/src/test/ui/parser/pat-tuple-4.stderr
+++ b/src/test/ui/parser/pat-tuple-4.stderr
@@ -1,8 +1,40 @@
-error: expected one of `)` or `,`, found `pat`
+error: `..X` range patterns are not supported
+  --> $DIR/pat-tuple-4.rs:3:10
+   |
+LL |         (.. pat) => {}
+   |          ^^^^^^ help: try using the minimum value for the type: `MIN..pat`
+
+error: arbitrary expressions aren't allowed in patterns
+  --> $DIR/pat-tuple-4.rs:3:10
+   |
+LL |         (.. pat) => {}
+   |          ^^^^^^
+
+error[E0425]: cannot find value `pat` in this scope
   --> $DIR/pat-tuple-4.rs:3:13
    |
 LL |         (.. pat) => {}
-   |             ^^^ expected one of `)` or `,` here
+   |             ^^^ not found in this scope
+
+error[E0658]: exclusive range pattern syntax is experimental
+  --> $DIR/pat-tuple-4.rs:3:10
+   |
+LL |         (.. pat) => {}
+   |          ^^^^^^
+   |
+   = note: for more information, see https://github.com/rust-lang/rust/issues/37854
+   = help: add #![feature(exclusive_range_pattern)] to the crate attributes to enable
+
+error[E0029]: only char and numeric types are allowed in range patterns
+  --> $DIR/pat-tuple-4.rs:3:10
+   |
+LL |         (.. pat) => {}
+   |          ^^^^^^ ranges require char or numeric types
+   |
+   = note: start type: [type error]
+   = note: end type: [type error]
 
-error: aborting due to previous error
+error: aborting due to 5 previous errors
 
+Some errors have detailed explanations: E0029, E0425, E0658.
+For more information about an error, try `rustc --explain E0029`.
diff --git a/src/test/ui/parser/pat-tuple-5.stderr b/src/test/ui/parser/pat-tuple-5.stderr
index f9832214c68..9f0118e9573 100644
--- a/src/test/ui/parser/pat-tuple-5.stderr
+++ b/src/test/ui/parser/pat-tuple-5.stderr
@@ -1,8 +1,40 @@
-error: unexpected token: `)`
-  --> $DIR/pat-tuple-5.rs:3:16
+error: `X..` range patterns are not supported
+  --> $DIR/pat-tuple-5.rs:3:10
    |
 LL |         (pat ..) => {}
-   |                ^
+   |          ^^^^^^ help: try using the maximum value for the type: `pat..MAX`
 
-error: aborting due to previous error
+error: arbitrary expressions aren't allowed in patterns
+  --> $DIR/pat-tuple-5.rs:3:10
+   |
+LL |         (pat ..) => {}
+   |          ^^^^^^
+
+error[E0425]: cannot find value `pat` in this scope
+  --> $DIR/pat-tuple-5.rs:3:10
+   |
+LL |         (pat ..) => {}
+   |          ^^^ not found in this scope
+
+error[E0658]: exclusive range pattern syntax is experimental
+  --> $DIR/pat-tuple-5.rs:3:10
+   |
+LL |         (pat ..) => {}
+   |          ^^^^^^
+   |
+   = note: for more information, see https://github.com/rust-lang/rust/issues/37854
+   = help: add #![feature(exclusive_range_pattern)] to the crate attributes to enable
+
+error[E0029]: only char and numeric types are allowed in range patterns
+  --> $DIR/pat-tuple-5.rs:3:10
+   |
+LL |         (pat ..) => {}
+   |          ^^^^^^ ranges require char or numeric types
+   |
+   = note: start type: [type error]
+   = note: end type: [type error]
+
+error: aborting due to 5 previous errors
 
+Some errors have detailed explanations: E0029, E0425, E0658.
+For more information about an error, try `rustc --explain E0029`.