Point to next token when it is in the expected line

This commit is contained in:
Esteban Küber 2017-11-29 13:28:47 -08:00
parent ea51b19dc7
commit fe89740957
4 changed files with 26 additions and 15 deletions

View file

@ -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

View file

@ -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)