2019-10-18 14:09:42 -05:00
|
|
|
#[warn(clippy::exit)]
|
2019-10-21 15:55:01 -05:00
|
|
|
|
2019-10-19 07:31:02 -05:00
|
|
|
fn not_main() {
|
2019-10-21 15:55:01 -05:00
|
|
|
if true {
|
|
|
|
std::process::exit(4);
|
2023-07-28 14:35:48 -05:00
|
|
|
//~^ ERROR: usage of `process::exit`
|
|
|
|
//~| NOTE: `-D clippy::exit` implied by `-D warnings`
|
2019-10-21 15:55:01 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-10-18 14:09:42 -05:00
|
|
|
fn main() {
|
2019-10-19 07:31:02 -05:00
|
|
|
if true {
|
|
|
|
std::process::exit(2);
|
|
|
|
};
|
|
|
|
not_main();
|
2019-10-18 14:09:42 -05:00
|
|
|
std::process::exit(1);
|
|
|
|
}
|