rust/tests/ui/exit.rs

13 lines
177 B
Rust
Raw Normal View History

2019-10-18 21:09:42 +02:00
#[warn(clippy::exit)]
2019-10-19 14:31:02 +02:00
fn not_main() {
std::process::exit(3);
}
2019-10-18 21:09:42 +02:00
fn main() {
2019-10-19 14:31:02 +02:00
if true {
std::process::exit(2);
};
not_main();
2019-10-18 21:09:42 +02:00
std::process::exit(1);
}