File tree 1 file changed +16
-11
lines changed
src/tools/compiletest/src
1 file changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -2394,7 +2394,8 @@ impl<'test> TestCx<'test> {
2394
2394
2395
2395
let proc_res = new_rustdoc. document ( & compare_dir) ;
2396
2396
if !proc_res. status . success ( ) {
2397
- proc_res. fatal ( Some ( "failed to run nightly rustdoc" ) , || ( ) ) ;
2397
+ eprintln ! ( "failed to run nightly rustdoc" ) ;
2398
+ return ;
2398
2399
}
2399
2400
2400
2401
#[ rustfmt:: skip]
@@ -2409,22 +2410,26 @@ impl<'test> TestCx<'test> {
2409
2410
] ;
2410
2411
let tidy_dir = |dir| {
2411
2412
let tidy = |file : & _ | {
2412
- Command :: new ( "tidy" )
2413
- . args ( & tidy_args)
2414
- . arg ( file)
2415
- . spawn ( )
2416
- . unwrap_or_else ( |err| {
2417
- self . fatal ( & format ! ( "failed to run tidy - is it installed? - {}" , err) )
2418
- } )
2419
- . wait ( )
2420
- . unwrap ( )
2413
+ let tidy_proc = Command :: new ( "tidy" ) . args ( & tidy_args) . arg ( file) . spawn ( ) ;
2414
+ match tidy_proc {
2415
+ Ok ( mut proc) => {
2416
+ proc. wait ( ) . unwrap ( ) ;
2417
+ true
2418
+ }
2419
+ Err ( err) => {
2420
+ eprintln ! ( "failed to run tidy - is it installed? - {}" , err) ;
2421
+ false
2422
+ }
2423
+ }
2421
2424
} ;
2422
2425
for entry in walkdir:: WalkDir :: new ( dir) {
2423
2426
let entry = entry. expect ( "failed to read file" ) ;
2424
2427
if entry. file_type ( ) . is_file ( )
2425
2428
&& entry. path ( ) . extension ( ) . and_then ( |p| p. to_str ( ) ) == Some ( "html" . into ( ) )
2426
2429
{
2427
- tidy ( entry. path ( ) ) ;
2430
+ if !tidy ( entry. path ( ) ) {
2431
+ return ;
2432
+ }
2428
2433
}
2429
2434
}
2430
2435
} ;
You can’t perform that action at this time.
0 commit comments