Skip to content
ZOLO / TE225 Type · error

unknown loop label

`break :label` or `continue :label` names no lexically active loop. Labels never cross a function/lambda boundary, and a `spawn`ed task or a callback scheduled with `every`, `after`, or `timeout` starts its own control-flow region, so it cannot jump to a loop in the caller.

Why this fires

break :label or continue :label names no lexically active loop. Labels do not cross function or lambda boundaries. A spawned task (spawn expr or a spawn { ... } block) and callbacks scheduled with every, after, or timeout also start a new control-flow region, so they cannot jump to a loop in the caller.

loop {
    break :missing // error[TE225]
}

Fix it

Spell the target exactly as it appears on an enclosing loop, or remove the label to target the innermost loop.

:search loop {
    break :search
}

See also

  • TE226 — the same label is active more than once.
  • TE227 — loop control appears outside every loop.

Global index

Find your way through Zolo

Try an idea

Start here

9 results

9 results

enespt-br