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