Improve diagnostics for parse errors in proc macro output #41663
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-parser
Area: The parsing of Rust source code to an AST
A-proc-macros
Area: Procedural macros
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Currently we make no real effort to inform users of parse errors in procedural macro output:
rust/src/libsyntax_ext/deriving/custom.rs
Line 105 in 9c15de4
People are stumbling on this in the wild: https://www.reddit.com/r/rust/comments/689ogb/how_to_debug_procmacro_derive_produced/
CC @nrc @jseyfried
I have some ideas on how to move forward but should we wait until #40939 lands? I don't think it's necessary since the changes would be (mostly) orthogonal.
The text was updated successfully, but these errors were encountered: