Point to next token when it is in the expected line
This commit is contained in:
parent
ea51b19dc7
commit
fe89740957
4 changed files with 26 additions and 15 deletions
|
|
@ -48,9 +48,7 @@ error: expected one of `!` or `::`, found `(`
|
|||
--> $DIR/issue-40006.rs:24:9
|
||||
|
|
||||
24 | ::Y (); //~ ERROR expected one of
|
||||
| -^ unexpected token
|
||||
| |
|
||||
| expected one of `!` or `::` here
|
||||
| ^ expected one of `!` or `::` here
|
||||
|
||||
error: missing `fn`, `type`, or `const` for impl-item declaration
|
||||
--> $DIR/issue-40006.rs:28:8
|
||||
|
|
|
|||
|
|
@ -2,18 +2,14 @@ error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found
|
|||
--> $DIR/main.rs:19:20
|
||||
|
|
||||
19 | () => { syntax error }; //~ ERROR expected one of
|
||||
| -^^^^^ unexpected token
|
||||
| |
|
||||
| expected one of 8 possible tokens here
|
||||
| ^^^^^ expected one of 8 possible tokens here
|
||||
$DIR/main.rs:24:5: 24:13 note: in this expansion of pong! (defined in $DIR/main.rs)
|
||||
|
||||
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `error`
|
||||
--> $DIR/main.rs:19:20
|
||||
|
|
||||
19 | () => { syntax error }; //~ ERROR expected one of
|
||||
| -^^^^^ unexpected token
|
||||
| |
|
||||
| expected one of 8 possible tokens here
|
||||
| ^^^^^ expected one of 8 possible tokens here
|
||||
$DIR/main.rs:25:5: 25:13 note: in this expansion of ping! (defined in <ping macros>)
|
||||
<ping macros>:1:11: 1:24 note: in this expansion of pong! (defined in $DIR/main.rs)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue