-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #40811 - estebank:issue-32540, r=jonathandturner
Point at last valid token on failed `expect_one_of` ```rust error: expected one of `.`, `;`, `?`, `}`, or an operator, found `)` --> $DIR/token-error-correct-3.rs:29:9 | 25 | foo() | - expected one of `.`, `;`, `?`, `}`, or an operator after this ... 29 | } else { | ^ unexpected token ``` Fix #32540.
- Loading branch information
Showing
13 changed files
with
128 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
error: expected one of `!` or `::`, found `<eof>` | ||
--> $DIR/bounds-obj-parens.rs:15:1 | ||
| | ||
15 | FAIL | ||
| ^^^^ expected one of `!` or `::` here | ||
|
||
error: aborting due to 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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
error: incorrect close delimiter: `}` | ||
--> $DIR/issue-10636-2.rs:19:1 | ||
| | ||
19 | } //~ ERROR: incorrect close delimiter | ||
| ^ | ||
| | ||
note: unclosed delimiter | ||
--> $DIR/issue-10636-2.rs:15:15 | ||
| | ||
15 | option.map(|some| 42; //~ NOTE: unclosed delimiter | ||
| ^ | ||
|
||
error: expected one of `,`, `.`, `?`, or an operator, found `;` | ||
--> $DIR/issue-10636-2.rs:15:25 | ||
| | ||
15 | option.map(|some| 42; //~ NOTE: unclosed delimiter | ||
| ^ expected one of `,`, `.`, `?`, or an operator here | ||
|
||
error: expected expression, found `)` | ||
--> $DIR/issue-10636-2.rs:19:1 | ||
| | ||
19 | } //~ ERROR: incorrect close delimiter | ||
| ^ | ||
|
||
error: main function not found | ||
|
||
error: aborting due to 4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
error: macro expansion ignores token `,` and any following | ||
--> $DIR/macro-incomplete-parse.rs:17:9 | ||
| | ||
17 | , //~ ERROR macro expansion ignores token `,` | ||
| ^ | ||
| | ||
note: caused by the macro expansion here; the usage of `ignored_item!` is likely invalid in item context | ||
--> $DIR/macro-incomplete-parse.rs:32:1 | ||
| | ||
32 | ignored_item!(); //~ NOTE caused by the macro expansion here | ||
| ^^^^^^^^^^^^^^^^ | ||
|
||
error: expected one of `.`, `;`, `?`, `}`, or an operator, found `,` | ||
--> $DIR/macro-incomplete-parse.rs:22:14 | ||
| | ||
22 | () => ( 1, //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `,` | ||
| ^ expected one of `.`, `;`, `?`, `}`, or an operator here | ||
|
||
error: macro expansion ignores token `,` and any following | ||
--> $DIR/macro-incomplete-parse.rs:29:14 | ||
| | ||
29 | () => ( 1, 2 ) //~ ERROR macro expansion ignores token `,` | ||
| ^ | ||
| | ||
note: caused by the macro expansion here; the usage of `ignored_pat!` is likely invalid in pattern context | ||
--> $DIR/macro-incomplete-parse.rs:37:9 | ||
| | ||
37 | ignored_pat!() => (), //~ NOTE caused by the macro expansion here | ||
| ^^^^^^^^^^^^^^ | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
error: expected one of `!` or `::`, found `<eof>` | ||
--> $DIR/trailing-plus-in-bounds.rs:19:1 | ||
| | ||
19 | FAIL | ||
| ^^^^ expected one of `!` or `::` here | ||
|
||
error: aborting due to previous error | ||
|