rust/tests/ui/loops/issue-1962.rs
2024-03-31 14:58:17 -03:00

11 lines
201 B
Rust

//@ 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; }
}
}