Rellum Rellum

S0100: copy enum contains Move field

Generated from rellum-diagnostics/src/db.rs.

Explanation

A Copy type must be duplicable without heap allocation. If any variant contains a Move field (String, Bytes, arrays, or non-copy records), the enum as a whole owns heap data and cannot be Copy.

Common causes

Canonical fixes

Before:

copy enum Foo = Bar { name: String }

After:

enum Foo = Bar { name: String }

Before:

copy enum Foo = Bar { name: String }

After:

copy enum Foo = Bar { code: Int }

Code example

copy enum Foo = Bar { name: String }