dtolnay / quote

Rust quasi-quoting
Apache License 2.0
1.32k stars 90 forks source link

Anyway to get where a syntax error is happening? #218

Closed gluax closed 2 years ago

gluax commented 2 years ago

Hi all, I'm getting an error for my proc macro,

a macro for generating mentat routes from a default Server instance

expected one of `.`, `;`, `?`, `}`, or an operator, found `=>`
expected one of `.`, `;`, `?`, `}`, or an operator rustc

But as you can see it fails to tell me where this line is happening, and I cannot find the cause of it at all. Is there some way to force quote to generate a error indicator or line number here? I would cargo expand but that also fails because of the above error :/

dtolnay commented 2 years ago

Hi @gluax, sorry that no one was able to provide guidance here. If this is still an issue, you could try taking this question to any of the resources shown in https://www.rust-lang.org/community.