Add lint for exit
This commit is contained in:
parent
7531a08eed
commit
695aa59c6d
5 changed files with 58 additions and 0 deletions
4
tests/ui/exit.rs
Normal file
4
tests/ui/exit.rs
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#[warn(clippy::exit)]
|
||||
fn main() {
|
||||
std::process::exit(1);
|
||||
}
|
||||
10
tests/ui/exit.stderr
Normal file
10
tests/ui/exit.stderr
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
error: usage of `process::exit`
|
||||
--> $DIR/exit.rs:3:5
|
||||
|
|
||||
LL | std::process::exit(1);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `-D clippy::exit` implied by `-D warnings`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue