You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
abonander opened this issue
Dec 18, 2016
· 1 comment
Labels
A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)E-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.
I'm trying to use nested macros to make parsing optional generics and where clauses a lot less clunky, but since the item fragment lumps the tokens together, the method_proto! macro can't parse the individual tokens anymore.
The text was updated successfully, but these errors were encountered:
abonander
changed the title
Macro item fragment lumps item tokens together so they can't be parsed separately
Macro item fragment lumps item component tokens together so they can't be parsed separately
Dec 18, 2016
jseyfried
added
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
E-hard
Call for participation: Hard difficulty. Experience needed to fix: A lot.
labels
Dec 19, 2016
A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)E-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.
Simplest reproduction (playpen):
Yields the following, very confusing error:
This makes it very difficult to use the
item
fragment type to accept valid function items and then parse them out in nested macros.For a more detailed use-case, see this file.
I'm trying to use nested macros to make parsing optional generics and
where
clauses a lot less clunky, but since theitem
fragment lumps the tokens together, themethod_proto!
macro can't parse the individual tokens anymore.The text was updated successfully, but these errors were encountered: