-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Matching tt is almost useless #9364
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-syntaxextArea: Syntax extensionsArea: Syntax extensions
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-syntaxextArea: Syntax extensionsArea: Syntax extensions
Type
Fields
Give feedbackNo fields configured for issues without a type.
Because of #3232, the macro parser can't match syntax of the form
$($x:some_nt)*under any circumstances. However, this is the natural way to deal with token trees, and adding a delimiter of some kind is prohibitively unergonomic.As a short-term fix, we could special-case
ttso that the macro parser doesn't farm it out to the main Rust parser. We could also introduce attseqor something to mean "zero or moretts". It's conceivable that we could also try being smarter with lookahead, but I don't think that's going to be fruitful.