forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#119380 - ShE3py:match-never-pat, r=petroche…
…nkov Don't suggest writing a bodyless arm if the pattern can never be a never pattern rust-lang#118527 enabled arms to be bodyless for never patterns ; this PR removes the `,` and `}` suggestions for patterns that could never be never patterns.
- Loading branch information
Showing
12 changed files
with
32 additions
and
26 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
4 changes: 2 additions & 2 deletions
4
tests/ui/half-open-range-patterns/range_pat_interactions1.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
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,8 +1,8 @@ | ||
error: expected one of `,`, `=>`, `@`, `if`, `|`, or `}`, found `[` | ||
error: expected one of `=>`, `@`, `if`, or `|`, found `[` | ||
--> $DIR/issue-24375.rs:6:12 | ||
| | ||
LL | tmp[0] => {} | ||
| ^ expected one of `,`, `=>`, `@`, `if`, `|`, or `}` | ||
| ^ expected one of `=>`, `@`, `if`, or `|` | ||
|
||
error: aborting due to 1 previous error | ||
|
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,7 +1,7 @@ | ||
fn main() { | ||
match 42 { | ||
x < 7 => (), | ||
//~^ error: expected one of `,`, `=>`, `@`, `if`, `|`, or `}`, found `<` | ||
//~^ error: expected one of `=>`, `@`, `if`, or `|`, found `<` | ||
_ => () | ||
} | ||
} |
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,8 +1,8 @@ | ||
error: expected one of `,`, `=>`, `@`, `if`, `|`, or `}`, found `<` | ||
error: expected one of `=>`, `@`, `if`, or `|`, found `<` | ||
--> $DIR/pat-lt-bracket-1.rs:3:7 | ||
| | ||
LL | x < 7 => (), | ||
| ^ expected one of `,`, `=>`, `@`, `if`, `|`, or `}` | ||
| ^ expected one of `=>`, `@`, `if`, or `|` | ||
|
||
error: aborting due to 1 previous error | ||
|