Parser error recovery in `syn` for better IDE support with proc-macros
Rust Internals [Unofficial]
May 31, 2026
kpreid:
For attribute macros and derive macros, if the macro is getting called at all, you know that
rustcthinks that the item is valid syntax
This isn't an issue of rustc only calling proc-macros with valid inputs, but of rust-analyzer calling a macro with input that doesn't parse because you haven't finished writing the input code and are trying to get code completions.
Discussion in the ATmosphere