Add label to primary span in some parse errors

This commit is contained in:
Esteban Küber 2018-02-18 23:08:23 -08:00
parent ba7039cfd6
commit 36baa81be9
5 changed files with 68 additions and 25 deletions

View file

@ -2,7 +2,7 @@ error: expected expression, found `_`
--> $DIR/underscore.rs:18:9
|
LL | _
| ^
| ^ expected expression
|
::: $DIR/main.rs:15:5
|

View file

@ -38,7 +38,7 @@ error: expected expression, found reserved keyword `typeof`
--> $DIR/macro-context.rs:13:17
|
LL | () => ( i ; typeof ); //~ ERROR expected expression, found reserved keyword `typeof`
| ^^^^^^
| ^^^^^^ expected expression
...
LL | m!();
| ----- in this macro invocation

View file

@ -26,7 +26,7 @@ error: expected expression, found `;`
--> $DIR/token-error-correct.rs:14:13
|
LL | foo(bar(;
| ^
| ^ expected expression
error: aborting due to 3 previous errors

View file

@ -20,7 +20,7 @@ error: expected expression, found `)`
--> $DIR/issue-10636-2.rs:18:1
|
LL | } //~ ERROR: incorrect close delimiter
| ^
| ^ expected expression
error[E0601]: main function not found