Skip to content
ZOLO / TE214 Type · error

generated derive items violate the declared scope

The generated items escape the expansion scope declared by `@derive_for`, such as an unrelated free function from an impl-scoped derive.

Why this fires

The generated items escape the derive's allowed expansion scope. For example, an impl-scoped derive may not smuggle an unrelated free function beside its generated impl.

Fix it

Keep the output inside the declared scope, or choose the appropriate scope: contract on @derive_for when broader output is intentional.

scope: siblings may emit a query or builder struct/enum and an impl for that type in the same expansion. It cannot add an impl to an unrelated type that already exists in the consumer. impl and helpers scopes remain restricted to the type requesting the derive.

Global index

Find your way through Zolo

Try an idea

Start here

9 results

9 results

enespt-br