File tree 5 files changed +32
-6
lines changed
5 files changed +32
-6
lines changed Original file line number Diff line number Diff line change @@ -6,15 +6,10 @@ fn not_main() {
6
6
}
7
7
}
8
8
9
- fn also_not_main ( ) {
10
- std:: process:: exit ( 3 ) ;
11
- }
12
-
13
9
fn main ( ) {
14
10
if true {
15
11
std:: process:: exit ( 2 ) ;
16
12
} ;
17
- also_not_main ( ) ;
18
13
not_main ( ) ;
19
14
std:: process:: exit ( 1 ) ;
20
15
}
Original file line number Diff line number Diff line change
1
+ error: usage of `process::exit`
2
+ --> $DIR/exit1.rs:5:9
3
+ |
4
+ LL | std::process::exit(4);
5
+ | ^^^^^^^^^^^^^^^^^^^^^
6
+ |
7
+ = note: `-D clippy::exit` implied by `-D warnings`
8
+
9
+ error: aborting due to previous error
10
+
Original file line number Diff line number Diff line change
1
+ #[ warn( clippy:: exit) ]
2
+
3
+ fn also_not_main ( ) {
4
+ std:: process:: exit ( 3 ) ;
5
+ }
6
+
7
+ fn main ( ) {
8
+ if true {
9
+ std:: process:: exit ( 2 ) ;
10
+ } ;
11
+ also_not_main ( ) ;
12
+ std:: process:: exit ( 1 ) ;
13
+ }
Original file line number Diff line number Diff line change 1
1
error: usage of `process::exit`
2
- --> $DIR/exit .rs:3 :5
2
+ --> $DIR/exit2 .rs:4 :5
3
3
|
4
4
LL | std::process::exit(3);
5
5
| ^^^^^^^^^^^^^^^^^^^^^
Original file line number Diff line number Diff line change
1
+ #[ warn( clippy:: exit) ]
2
+
3
+ fn main ( ) {
4
+ if true {
5
+ std:: process:: exit ( 2 ) ;
6
+ } ;
7
+ std:: process:: exit ( 1 ) ;
8
+ }
You can’t perform that action at this time.
0 commit comments