summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/target/configs/trailing_semicolon/true.rs
blob: 61b6843d677cb5b9b0bdd4a99932cd9a943beeee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// rustfmt-trailing_semicolon: true

#![feature(loop_break_value)]

fn main() {
    'a: loop {
        break 'a;
    }

    let mut done = false;
    'b: while !done {
        done = true;
        continue 'b;
    }

    let x = loop {
        break 5;
    };

    let x = 'c: loop {
        break 'c 5;
    };
}

fn foo() -> usize {
    return 0;
}