aboutsummaryrefslogtreecommitdiffstats
path: root/tests/indent/rust/loop.rs
blob: eb845bc0f5b4dcb2fdfd2c58b6ca3a8a38160746 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
fn foo(mut x: i32) {
    while x > 0 {
        x -= 1;
    }

    for i in 0..3 {
        x += 1;
    }

    loop {
        x += 1;

        if x < 100 {
            continue;
        }

        break;
    }
}