summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/exit1.rs
blob: 4eac6eb74672fac716d1aaf8726855ca8febd918 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#[warn(clippy::exit)]

fn not_main() {
    if true {
        std::process::exit(4);
    }
}

fn main() {
    if true {
        std::process::exit(2);
    };
    not_main();
    std::process::exit(1);
}