Error code E0695

A break statement without a label appeared inside a labeled block.

Erroneous code example:

loop {
    'a: {
        break;
    }
}
Run

Make sure to always label the break:

'l: loop {
    'a: {
        break 'l;
    }
}
Run

Or if you want to break the labeled block:

loop {
    'a: {
        break 'a;
    }
    break;
}
Run

Back to list of error codes