File tree Expand file tree Collapse file tree 5 files changed +32
-6
lines changed Expand file tree Collapse file tree 5 files changed +32
-6
lines changed Original file line number Diff line number Diff line change @@ -6,15 +6,10 @@ fn not_main() {
66    } 
77} 
88
9- fn  also_not_main ( )  { 
10-     std:: process:: exit ( 3 ) ; 
11- } 
12- 
139fn  main ( )  { 
1410    if  true  { 
1511        std:: process:: exit ( 2 ) ; 
1612    } ; 
17-     also_not_main ( ) ; 
1813    not_main ( ) ; 
1914    std:: process:: exit ( 1 ) ; 
2015} 
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 11error: usage of `process::exit`
2-   --> $DIR/exit .rs:3 :5
2+   --> $DIR/exit2 .rs:4 :5
33   |
44LL |     std::process::exit(3);
55   |     ^^^^^^^^^^^^^^^^^^^^^
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