Why this fires¶
An unlabelled break or continue appears outside a loop. These statements
can only transfer control within an enclosing loop, while, or for.
fn invalid() {
break // error[TE227]
}Fix it¶
Move the statement into the loop it controls. To leave a function, use
return instead.
See also¶
TE225— a labelled exit names no active loop.