forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pre-expansion gate exclusive_range_pattern
- Loading branch information
Showing
8 changed files
with
33 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 5 additions & 1 deletion
6
src/test/ui/feature-gates/feature-gate-exclusive-range-pattern.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
pub fn main() { | ||
#[cfg(FALSE)] | ||
fn foo() { | ||
match 22 { | ||
0 .. 3 => {} //~ ERROR exclusive range pattern syntax is experimental | ||
PATH .. 3 => {} //~ ERROR exclusive range pattern syntax is experimental | ||
_ => {} | ||
} | ||
} | ||
|
||
fn main() {} |
15 changes: 12 additions & 3 deletions
15
src/test/ui/feature-gates/feature-gate-exclusive-range-pattern.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,21 @@ | ||
error[E0658]: exclusive range pattern syntax is experimental | ||
--> $DIR/feature-gate-exclusive-range-pattern.rs:3:9 | ||
--> $DIR/feature-gate-exclusive-range-pattern.rs:4:11 | ||
| | ||
LL | 0 .. 3 => {} | ||
| ^^^^^^ | ||
| ^^ | ||
| | ||
= 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: aborting due to previous error | ||
error[E0658]: exclusive range pattern syntax is experimental | ||
--> $DIR/feature-gate-exclusive-range-pattern.rs:5:14 | ||
| | ||
LL | PATH .. 3 => {} | ||
| ^^ | ||
| | ||
= 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: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0658`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters