I was working on a macro which implements a trait for a type, which I wanted to be a declarative macro, but this doesn't work if the type has generic arguments that I want to use as generic.
Toy example of what I want to do
This case is simple enough that I could match the generics with
$( <$param:tt> )?, but more generally you can produce a knot of lifetimes, types, and
const values with potentially quite complicated constraints on them, that is very difficult (maybe impossible?) to parse properly.
So it got me thinking: is there any reason why there isn't a
:generic metavariable to use in declarative macros? I looked up and saw a couple of discussions on here that fizzled out without anything coming of them, and nothing in issue tickets or RFCs on GitHub, though it's possible I missed something.