Rellum Rellum

S0133: cannot borrow moved value

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

Explanation

After a Move value is consumed, the original binding no longer owns valid storage. Borrowing it would create a reference to a value that has already transferred ownership.

Common causes

Canonical fixes

Before:

x = consume(buf)
r = &buf

After:

r = &buf
n = len(r)
x = consume(buf)

Code example

x = consume(buf)
r = &buf