rust/tests/ui/for-loop-while/while-cont.rs
2023-01-11 09:32:08 +00:00

12 lines
226 B
Rust

// run-pass
// Issue #825: Should recheck the loop condition after continuing
pub fn main() {
let mut i = 1;
while i > 0 {
assert!((i > 0));
println!("{}", i);
i -= 1;
continue;
}
}