E0086#
Warning name: unlabelled_continue_in_labelled_loop
Using an unlabelled continue directly inside a labelled loop is deprecated.
Once a loop has a label, name it in a continue that targets the loop, even
when the continue is not nested inside another loop.
Erroneous example#
///|
pub fn skip_all() -> Unit {
outer~: for i = 0; i < 3; i = i + 1 {
ignore(i)
continue
}
}
Suggestion#
Name the loop explicitly in the continue.
///|
pub fn skip_all() -> Unit {
outer~: for i = 0; i < 3; i = i + 1 {
ignore(i)
continue outer~
}
}