]> git.lizzy.rs Git - rust.git/blob - tests/run-make/coverage/nested_loops.rs
Rollup merge of #106618 - jmillikin:os-net-rustdoc-wasm32, r=JohnTitor
[rust.git] / tests / run-make / coverage / nested_loops.rs
1 fn main() {
2     let is_true = std::env::args().len() == 1;
3     let mut countdown = 10;
4
5     'outer: while countdown > 0 {
6         let mut a = 100;
7         let mut b = 100;
8         for _ in 0..50 {
9             if a < 30 {
10                 break;
11             }
12             a -= 5;
13             b -= 5;
14             if b < 90 {
15                 a -= 10;
16                 if is_true {
17                     break 'outer;
18                 } else {
19                     a -= 2;
20                 }
21             }
22         }
23         countdown -= 1;
24     }
25 }