External Publication
Visit Post

Parser error recovery in `syn` for better IDE support with proc-macros

Rust Internals [Unofficial] May 31, 2026
Source

FWIW, what you should do when syn fails to parse is to return the original code unchanged. This is better for both IDEs and the compiler, although it's not a common practice unfortunately.

Discussion in the ATmosphere

Loading comments...