Why this fires¶
A structured derive returned syntax with a category that cannot be inserted at
its destination. A derive result must currently be Syntax<.Items> or
Syntax<.Item>.
@derive_for(Tag)
fn derive_tag(info) -> Syntax<.Expr> {
return quote expr { info.name }
}Fix it¶
Return an item template, and use narrower categories only for nested holes.
fn derive_tag(info) -> Syntax<.Items> {
return quote items { impl ${info.ref} {} }
}