Rellum Rellum

S0060: use of moved value

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

Explanation

Once a Move value has been consumed by an expression, it no longer exists. Using it again in a later binding would access freed or invalid memory. The compiler tracks consumption sequentially through binding expressions.

Common causes

Canonical fixes

Before:

a = consume(data)
b = also_consume(data)

After:

a = consume(share(data))
b = also_consume(share(data))

Code example

a = consume(data)
b = also_consume(data)