-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTA-proc-macrosArea: Procedural macrosArea: Procedural macrosT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
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
let msg = "proc-macro derive produced unparseable tokens"; |
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.
kennytm, OJFord, Palpatineli, PSeitz, shssoichiro and 23 more
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTA-proc-macrosArea: Procedural macrosArea: Procedural macrosT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.