Add label to primary span in some parse errors
This commit is contained in:
parent
ba7039cfd6
commit
36baa81be9
5 changed files with 68 additions and 25 deletions
|
|
@ -2,7 +2,7 @@ error: expected expression, found `_`
|
|||
--> $DIR/underscore.rs:18:9
|
||||
|
|
||||
LL | _
|
||||
| ^
|
||||
| ^ expected expression
|
||||
|
|
||||
::: $DIR/main.rs:15:5
|
||||
|
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue