Skip to content
TE216 · Type · error

Deriver returned an unsupported value type

A `@derive_for` function returned a value other than the supported `str`, `Syntax<.Items>`, or `Syntax<.Item>` results.

Why this fires

The @derive_for function returned a value that is not a supported derive result. The compatibility contract accepts str; the structured contract accepts Syntax<.Items> and Syntax<.Item>.

Fix it

Prefer a structured item quote:

@derive_for(Tag)
fn derive_tag(info) -> Syntax<.Items> {
  return quote items { impl ${info.ref} {} }
}

See also

Search Zolo

9 results

en