-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
And --bless tests accordingly for those exceptions.
- Loading branch information
Showing
14 changed files
with
198 additions
and
534 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
fn main() { | ||
const PAT: u8 = 0; | ||
|
||
match 0 { | ||
(.. pat) => {} | ||
(.. PAT) => {} | ||
//~^ ERROR `..X` range patterns are not supported | ||
//~| ERROR arbitrary expressions aren't allowed in patterns | ||
//~| ERROR cannot find value `pat` in this scope | ||
//~| ERROR exclusive range pattern syntax is experimental | ||
//~| ERROR only char and numeric types are allowed in range patterns | ||
} | ||
} | ||
|
||
const RECOVERY_WITNESS: () = 0; //~ ERROR mismatched types |
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,40 +1,28 @@ | ||
error: `..X` range patterns are not supported | ||
--> $DIR/pat-tuple-4.rs:3:10 | ||
--> $DIR/pat-tuple-4.rs:5: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) => {} | ||
| ^^^ not found in this scope | ||
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:3:10 | ||
--> $DIR/pat-tuple-4.rs:5:10 | ||
| | ||
LL | (.. pat) => {} | ||
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 | ||
error[E0308]: mismatched types | ||
--> $DIR/pat-tuple-4.rs:11:30 | ||
| | ||
LL | (.. pat) => {} | ||
| ^^^^^^ ranges require char or numeric types | ||
LL | const RECOVERY_WITNESS: () = 0; | ||
| ^ expected (), found integer | ||
| | ||
= note: start type: [type error] | ||
= note: end type: [type error] | ||
= note: expected type `()` | ||
found type `{integer}` | ||
|
||
error: aborting due to 5 previous errors | ||
error: aborting due to 3 previous errors | ||
|
||
Some errors have detailed explanations: E0029, E0425, E0658. | ||
For more information about an error, try `rustc --explain E0029`. | ||
Some errors have detailed explanations: E0308, E0658. | ||
For more information about an error, try `rustc --explain E0308`. |
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,10 +1,10 @@ | ||
fn main() { | ||
const PAT: u8 = 0; | ||
|
||
match (0, 1) { | ||
(pat ..) => {} | ||
(PAT ..) => {} | ||
//~^ ERROR `X..` range patterns are not supported | ||
//~| ERROR arbitrary expressions aren't allowed in patterns | ||
//~| ERROR cannot find value `pat` in this scope | ||
//~| ERROR exclusive range pattern syntax is experimental | ||
//~| ERROR only char and numeric types are allowed in range patterns | ||
//~| ERROR mismatched types | ||
} | ||
} |
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,40 +1,30 @@ | ||
error: `X..` range patterns are not supported | ||
--> $DIR/pat-tuple-5.rs:3:10 | ||
--> $DIR/pat-tuple-5.rs:5:10 | ||
| | ||
LL | (pat ..) => {} | ||
| ^^^^^^ help: try using the maximum value for the type: `pat..MAX` | ||
|
||
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 | ||
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:3:10 | ||
--> $DIR/pat-tuple-5.rs:5:10 | ||
| | ||
LL | (pat ..) => {} | ||
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 | ||
error[E0308]: mismatched types | ||
--> $DIR/pat-tuple-5.rs:5:10 | ||
| | ||
LL | (pat ..) => {} | ||
| ^^^^^^ ranges require char or numeric types | ||
LL | match (0, 1) { | ||
| ------ this match expression has type `({integer}, {integer})` | ||
LL | (PAT ..) => {} | ||
| ^^^^^^ expected tuple, found u8 | ||
| | ||
= note: start type: [type error] | ||
= note: end type: [type error] | ||
= note: expected type `({integer}, {integer})` | ||
found type `u8` | ||
|
||
error: aborting due to 5 previous errors | ||
error: aborting due to 3 previous errors | ||
|
||
Some errors have detailed explanations: E0029, E0425, E0658. | ||
For more information about an error, try `rustc --explain E0029`. | ||
Some errors have detailed explanations: E0308, E0658. | ||
For more information about an error, try `rustc --explain E0308`. |
Oops, something went wrong.