]> git.lizzy.rs Git - rust.git/blob - tests/ui/exit.rs
Update clippy_lints/src/lib.rs
[rust.git] / tests / ui / exit.rs
1 #[warn(clippy::exit)]
2
3 fn not_main() {
4     if true {
5         std::process::exit(4);
6     }
7 }
8
9 fn also_not_main() {
10     std::process::exit(3);
11 }
12
13 fn main() {
14     if true {
15         std::process::exit(2);
16     };
17     also_not_main();
18     not_main();
19     std::process::exit(1);
20 }