{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreic2y2zjjovhdjx6nja2rkoyb4er3unhsgwd2cnvvfamofyluzid6a",
"uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mn4wktwtids2"
},
"path": "/t/parser-error-recovery-in-syn-for-better-ide-support-with-proc-macros/24362#post_13",
"publishedAt": "2026-05-31T05:29:24.000Z",
"site": "https://internals.rust-lang.org",
"textContent": "programmerjake:\n\n> 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.\n\nThat’s fair. And _in that case_ , I can see it being reasonable for the macro to fall back to passing through its input if it has nothing better can do, because rust-analyzer isn’t ever going to be 100% at reporting errors. But it is important that, when run by rustc, macros never just silently stop working.\n\nSo, I stand by my original suggestion: output a `compile_error!()` _and_ the unmodified input. That should get you the completion benefits and also a guaranteed error.",
"title": "Parser error recovery in `syn` for better IDE support with proc-macros"
}