rust/tests/ui/exit2.rs
2019-11-07 17:11:06 +01:00

13 lines
188 B
Rust

#[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);
}