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

fn also_not_main() {
    std::process::exit(3);
}

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