Macro literal
fragment specifiers should forward to exact tokens
#124989
Labels
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
A-maybe-future-edition
Something we may consider for a future edition.
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
WG-macros
Working group: Macros
Motivating example (playground link):
The above fails to compile because
literal
does not forward to exact matches, but it doesn't seem like there is any reason it shouldn't.ident
ortt
can be used, but loosening restrictions can cause other problems.This probably couldn't be changed without an edition depending on fallout, but we can probably make sure this works with macros 2.0.
The reference makes a comment about forwarding here: https://doc.rust-lang.org/nightly/reference/macros-by-example.html#forwarding-a-matched-fragment
The text was updated successfully, but these errors were encountered: