Skip to content
ZOLO / TE171 Type · error

linear value used after it was consumed

Compiler diagnostic TE171: linear value used after it was consumed.

Why this fires

A linear value is used after it was consumed, or consumed twice, or consumed where it is only borrowed.

tx.commit()
tx.execute("...")   // TE171: `tx` was already consumed

A parameter without sink is lent to the function, which cannot consume it. A linear field read through a borrowed value cannot be consumed either.

Fix it

Use the value before its consumer, declare the parameter sink to take ownership, or destructure the holder in its own module to take a field out.

Global index

Find your way through Zolo

Try an idea

Start here

9 results

9 results

en