macros can't interpolate impl items (or really parse them at all) #48137
Labels
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
A-parser
Area: The parsing of Rust source code to an AST
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
This macro will never work:
Instead of reinterpreting
$method
as an impl item, the macro expander says it was expectingconst
,crate
,default
,extern
,fn
,pub
,type
,unsafe
, or}
.Moreover
:item
isn't good enough for parsing impl items because it doesn't have a special case forself
arguments.Is the solution to create a new
:implitem
or to make:item
more flexible in parsing and expansion?The text was updated successfully, but these errors were encountered: