Code
fn main() {
println!("", x.);
}
Current output
error: unexpected token: `<eof>`
--> src/main.rs:2:19
|
2 | println!("", x.);
| ^
Desired output
error: unexpected token: `)`
--> src/main.rs:2:19
|
2 | println!("", x.);
| ^
Rationale and extra context
While I fully understand, why it is saying <eof>, I'm not sure if this can be improved, e.g. if the subparser says eof but the current parser has a character at that position, it could say which one it is.
Also the spike ^ points to the "eof" of the macro input, which can be improved I guess.
If we remove the !, it is exactly what I'd like to see:
error: unexpected token: `)`
--> src/main.rs:2:19
|
2 | println("", x.);
| ^
Code
Current output
Desired output
Rationale and extra context
While I fully understand, why it is saying
<eof>, I'm not sure if this can be improved, e.g. if the subparser says eof but the current parser has a character at that position, it could say which one it is.Also the spike
^points to the "eof" of the macro input, which can be improved I guess.If we remove the
!, it is exactly what I'd like to see: