-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Panic in proc_macro::TokenStream::from_str #58736
Copy link
Copy link
Closed
Labels
A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)A-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.
Metadata
Metadata
Assignees
Labels
A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)A-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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
TokenStream::from_str is supposed to return
Result<proc_macro::TokenStream, proc_macro::LexError>. Currently it appears to print errors to stderr and then panic, rather than returning errors.Cargo.toml
src/lib.rs
src/main.rs
Output of
cargo check:Mentioning @eddyb, @petrochenkov, @alexcrichton.
Mentioning @canndrew who reported this in dtolnay/proc-macro2#168.