about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/exit1.rs
blob: be8752cc7d8e280a6fe4a5bfbb5ea08a430655da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#![warn(clippy::exit)]

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

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