summaryrefslogtreecommitdiffstats
path: root/tests/ui/while/while-else-let-else-err.rs
blob: 6d9909347c3b11372139d6e316c36387827fdd30 (plain)
1
2
3
4
5
6
7
8
fn main() {
    let _ = 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
    };
}