summaryrefslogtreecommitdiffstats
path: root/tests/ui/while/while-else-err.rs
blob: 36b60fbd4be2416ca84b0d5d2dda8a3da195b199 (plain)
1
2
3
4
5
6
7
8
fn main() {
    while false {
        //~^ NOTE `else` is attached to this loop
    } else {
        //~^ ERROR `while...else` loops are not supported
        //~| NOTE consider moving this `else` clause to a separate `if` statement and use a `bool` variable to control if it should run
    };
}