Skip to content
ZOLO / TE173 Type · error

linear value from outside a loop consumed inside it

Compiler diagnostic TE173: linear value from outside a loop consumed inside it.

Why this fires

A linear value created outside a loop is consumed inside it: the second iteration would consume it again.

let conn = pool.take()
for job in jobs {
  conn.release()      // TE173
}

Fix it

Create the value inside the loop, or break right after consuming it.

Global index

Find your way through Zolo

Try an idea

Start here

9 results

9 results

en