summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-1962.rs
blob: 71e874100874f4fba0367ae8a2a093f124fc8e3b (plain)
1
2
3
4
5
6
7
8
9
10
// compile-flags: -D while-true
// run-rustfix

fn main() {
    let mut i = 0;
    'a: while true { //~ ERROR denote infinite loops with `loop
        i += 1;
        if i == 5 { break 'a; }
    }
}