mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-16 21:15:18 +03:00
16 lines
228 B
Rust
16 lines
228 B
Rust
//@compile-flags: --test
|
|
#![warn(clippy::exit)]
|
|
|
|
fn also_not_main() {
|
|
std::process::exit(3);
|
|
//~^ exit
|
|
}
|
|
|
|
fn main() {
|
|
if true {
|
|
std::process::exit(2);
|
|
};
|
|
also_not_main();
|
|
std::process::exit(1);
|
|
}
|