External Publication
Visit Post

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

Rust Internals [Unofficial] May 31, 2026
Source

kpreid:

For attribute macros and derive macros, if the macro is getting called at all, you know that rustc thinks 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

Loading comments...