* When encountering EOF, point at the last opening brace that does not have the same indentation level as its close delimiter. * When encountering the wrong type of close delimiter, point at the likely correct open delimiter to give a better idea of what went wrong.
19 lines
490 B
Text
19 lines
490 B
Text
error: incorrect close delimiter: `}`
|
|
--> $DIR/token-error-correct.rs:16:1
|
|
|
|
|
LL | fn main() {
|
|
| - close delimiter possibly meant for this
|
|
LL | foo(bar(;
|
|
| - un-closed delimiter
|
|
LL | //~^ ERROR: expected expression, found `;`
|
|
LL | }
|
|
| ^ incorrect close delimiter
|
|
|
|
error: expected expression, found `;`
|
|
--> $DIR/token-error-correct.rs:14:13
|
|
|
|
|
LL | foo(bar(;
|
|
| ^ expected expression
|
|
|
|
error: aborting due to 2 previous errors
|
|
|