rust/src/test/ui/resolve/token-error-correct.stderr
Esteban Küber 78ae8feebb Improve wording and spans for unexpected token
* Point at where the token was expected instead of the last token
  successfuly parsed.
* Only show `unexpected token` if the next char and the unexpected token
  don't have the same span.
* Change some cfail and pfail tests to ui test.
* Don't show all possible tokens in span label if they are more than 6.
2017-03-25 15:36:59 -07:00

56 lines
1.3 KiB
Text

error: incorrect close delimiter: `}`
--> $DIR/token-error-correct.rs:23:1
|
23 | }
| ^
|
note: unclosed delimiter
--> $DIR/token-error-correct.rs:14:12
|
14 | foo(bar(;
| ^
error: incorrect close delimiter: `}`
--> $DIR/token-error-correct.rs:23:1
|
23 | }
| ^
|
note: unclosed delimiter
--> $DIR/token-error-correct.rs:14:8
|
14 | foo(bar(;
| ^
error: expected expression, found `;`
--> $DIR/token-error-correct.rs:14:13
|
14 | foo(bar(;
| ^
error: expected one of `)`, `,`, `.`, `<`, `?`, `break`, `continue`, `false`, `for`, `if`, `loop`, `match`, `move`, `return`, `true`, `unsafe`, `while`, or an operator, found `;`
--> $DIR/token-error-correct.rs:14:13
|
14 | foo(bar(;
| ^ expected one of 18 possible tokens here
error: expected expression, found `)`
--> $DIR/token-error-correct.rs:23:1
|
23 | }
| ^
error[E0425]: cannot find function `foo` in this scope
--> $DIR/token-error-correct.rs:14:5
|
14 | foo(bar(;
| ^^^ not found in this scope
error[E0425]: cannot find function `bar` in this scope
--> $DIR/token-error-correct.rs:14:9
|
14 | foo(bar(;
| ^^^ not found in this scope
error: aborting due to 7 previous errors