
- 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.
15 lines
469 B
Text
15 lines
469 B
Text
error: unexpected token: `#`
|
|
--> <crate attribute>:1:23
|
|
|
|
|
LL | #![feature(yeet_expr)]#![allow(warnings)]
|
|
| ^ unexpected token after this
|
|
|
|
error[E0601]: `main` function not found in crate `injection2`
|
|
--> $DIR/injection2.rs:3:12
|
|
|
|
|
LL | fn foo() {}
|
|
| ^ consider adding a `main` function to `$DIR/injection2.rs`
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0601`.
|