pre-expansion gate exclusive_range_pattern

This commit is contained in:
Mazdak Farrokhzad
2019-09-21 20:11:00 +02:00
parent 2aff6b36d7
commit 665a876e30
8 changed files with 33 additions and 28 deletions

View File

@@ -4,7 +4,6 @@ fn main() {
match 0 {
(.. PAT) => {}
//~^ ERROR `..X` range patterns are not supported
//~| ERROR exclusive range pattern syntax is experimental
}
}

View File

@@ -4,17 +4,8 @@ error: `..X` range patterns are not supported
LL | (.. PAT) => {}
| ^^^^^^ help: try using the minimum value for the type: `MIN..PAT`
error[E0658]: exclusive range pattern syntax is experimental
--> $DIR/pat-tuple-4.rs:5: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[E0308]: mismatched types
--> $DIR/pat-tuple-4.rs:11:30
--> $DIR/pat-tuple-4.rs:10:30
|
LL | const RECOVERY_WITNESS: () = 0;
| ^ expected (), found integer
@@ -22,7 +13,6 @@ LL | const RECOVERY_WITNESS: () = 0;
= note: expected type `()`
found type `{integer}`
error: aborting due to 3 previous errors
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0308, E0658.
For more information about an error, try `rustc --explain E0308`.
For more information about this error, try `rustc --explain E0308`.

View File

@@ -5,10 +5,10 @@ LL | (PAT ..) => {}
| ^^^^^^ help: try using the maximum value for the type: `PAT..MAX`
error[E0658]: exclusive range pattern syntax is experimental
--> $DIR/pat-tuple-5.rs:5:10
--> $DIR/pat-tuple-5.rs:5:14
|
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