@@ -232,10 +232,8 @@ impl<'test> TestCx<'test> {
232
232
/// Code executed for each revision in turn (or, if there are no
233
233
/// revisions, exactly once, with revision == None).
234
234
fn run_revision ( & self ) {
235
- if self . props . should_ice {
236
- if self . config . mode != Incremental {
237
- self . fatal ( "cannot use should-ice in a test that is not cfail" ) ;
238
- }
235
+ if self . props . should_ice && self . config . mode != Incremental {
236
+ self . fatal ( "cannot use should-ice in a test that is not cfail" ) ;
239
237
}
240
238
match self . config . mode {
241
239
RunPassValgrind => self . run_valgrind_test ( ) ,
@@ -3162,11 +3160,10 @@ impl<'test> TestCx<'test> {
3162
3160
if !proc_res. status . success ( ) {
3163
3161
self . fatal_proc_rec ( "test run failed!" , & proc_res) ;
3164
3162
}
3165
- } else {
3166
- if proc_res. status . success ( ) {
3167
- self . fatal_proc_rec ( "test run succeeded!" , & proc_res) ;
3168
- }
3163
+ } else if proc_res. status . success ( ) {
3164
+ self . fatal_proc_rec ( "test run succeeded!" , & proc_res) ;
3169
3165
}
3166
+
3170
3167
if !self . props . error_patterns . is_empty ( ) {
3171
3168
// "// error-pattern" comments
3172
3169
self . check_error_patterns ( & proc_res. stderr , & proc_res, pm) ;
@@ -3213,10 +3210,11 @@ impl<'test> TestCx<'test> {
3213
3210
if !res. status . success ( ) {
3214
3211
self . fatal_proc_rec ( "failed to compile fixed code" , & res) ;
3215
3212
}
3216
- if !res. stderr . is_empty ( ) && !self . props . rustfix_only_machine_applicable {
3217
- if !json:: rustfix_diagnostics_only ( & res. stderr ) . is_empty ( ) {
3218
- self . fatal_proc_rec ( "fixed code is still producing diagnostics" , & res) ;
3219
- }
3213
+ if !res. stderr . is_empty ( )
3214
+ && !self . props . rustfix_only_machine_applicable
3215
+ && !json:: rustfix_diagnostics_only ( & res. stderr ) . is_empty ( )
3216
+ {
3217
+ self . fatal_proc_rec ( "fixed code is still producing diagnostics" , & res) ;
3220
3218
}
3221
3219
}
3222
3220
}
0 commit comments