-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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, ..)C-bugCategory: This is a bug.Category: This is a bug.T-langRelevant to the language teamRelevant to the language team
Description
On rustc 1.21.0 it is legal to write a rule like
($($arg:expr)*) => { println!($($arg),*) }
but the manual does not allow space as a separator in an expr list:
https://doc.rust-lang.org/book/first-edition/macros.html#syntactic-requirements
which is reasonable because it leads to ambiguities (e.g. "a b -c" could be three expressions "a", "b", and "-c", or two, "a" and "b-c"). (If you're curious, the implementation picks the second choice in this case).
qnighy
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, ..)C-bugCategory: This is a bug.Category: This is a bug.T-langRelevant to the language teamRelevant to the language team