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.
Rollup merge of rust-lang#66718 - VirrageS:use_comma, r=Centril
Refactor `parse_enum_item` to use `parse_delim_comma_seq` Followup after rust-lang#66641 Some errors got more verbose but I think they make sense with the help message.
- Loading branch information
Showing
11 changed files
with
124 additions
and
92 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
fn main() { | ||
enum Test { | ||
Very | ||
//~^ ERROR missing comma | ||
Bad(usize) | ||
//~^ ERROR missing comma | ||
Stuff { a: usize } | ||
//~^ ERROR missing comma | ||
Very //~ HELP missing `,` | ||
Bad(usize) //~ HELP missing `,` | ||
//~^ ERROR expected one of `(`, `,`, `=`, `{`, or `}`, found `Bad` | ||
Stuff { a: usize } //~ HELP missing `,` | ||
//~^ ERROR expected one of `,`, `=`, or `}`, found `Stuff` | ||
Here | ||
//~^ ERROR expected one of `,`, `=`, or `}`, found `Here` | ||
} | ||
} |
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,20 +1,37 @@ | ||
error: missing comma | ||
--> $DIR/recover-enum.rs:3:13 | ||
error: expected one of `(`, `,`, `=`, `{`, or `}`, found `Bad` | ||
--> $DIR/recover-enum.rs:4:9 | ||
| | ||
LL | Very | ||
| ^ help: missing comma | ||
| - | ||
| | | ||
| expected one of `(`, `,`, `=`, `{`, or `}` | ||
| help: missing `,` | ||
LL | Bad(usize) | ||
| ^^^ unexpected token | ||
|
||
error: missing comma | ||
--> $DIR/recover-enum.rs:5:19 | ||
error: expected one of `,`, `=`, or `}`, found `Stuff` | ||
--> $DIR/recover-enum.rs:6:9 | ||
| | ||
LL | Bad(usize) | ||
| ^ help: missing comma | ||
| - | ||
| | | ||
| expected one of `,`, `=`, or `}` | ||
| help: missing `,` | ||
LL | | ||
LL | Stuff { a: usize } | ||
| ^^^^^ unexpected token | ||
|
||
error: missing comma | ||
--> $DIR/recover-enum.rs:7:27 | ||
error: expected one of `,`, `=`, or `}`, found `Here` | ||
--> $DIR/recover-enum.rs:8:9 | ||
| | ||
LL | Stuff { a: usize } | ||
| ^ help: missing comma | ||
| - | ||
| | | ||
| expected one of `,`, `=`, or `}` | ||
| help: missing `,` | ||
LL | | ||
LL | Here | ||
| ^^^^ unexpected token | ||
|
||
error: aborting due to 3 previous errors | ||
|
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