summaryrefslogtreecommitdiffstats
path: root/tests/ui/loops/loop-else-let-else-err.rs
blob: e828ffef549e8a47b87621dd350420e07e83d9d7 (plain)
1
2
3
4
5
6
7
8
fn main() {
    let _ = loop {
        //~^ NOTE `else` is attached to this loop
    } else {
        //~^ ERROR `loop...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
    };
}