mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-30 22:47:32 +00:00
- Show the `#![ ... ]` in the span (to make it clear that it should not be included in the CLI argument) - Show more detailed errors when the crate has valid token trees but invalid syntax. Previously, `crate-attr=feature(foo),feature(bar)` would just say "invalid crate attribute" and point at the comma. Now, it explicitly says that the comma was unexpected, which is useful when using `--error-format=short`. It also fixes the column to show the correct span. - Recover from parse errors. Previously we would abort immediately on syntax errors; now we go on to try and type-check the rest of the crate. The new diagnostic code also happens to be slightly shorter.
21 lines
389 B
Plaintext
21 lines
389 B
Plaintext
error: unknown start of token: `
|
|
--> <crate attribute>:1:4
|
|
|
|
|
LL | #![`%~@$#]
|
|
| ^
|
|
|
|
|
help: Unicode character '`' (Grave Accent) looks like ''' (Single Quote), but it is not
|
|
|
|
|
LL - #![`%~@$#]
|
|
LL + #!['%~@$#]
|
|
|
|
|
|
|
error: expected identifier, found `%`
|
|
--> <crate attribute>:1:5
|
|
|
|
|
LL | #![`%~@$#]
|
|
| ^ expected identifier
|
|
|
|
error: aborting due to 2 previous errors
|
|
|