File tree Expand file tree Collapse file tree 1 file changed +16
-11
lines changed
src/tools/compiletest/src Expand file tree Collapse file tree 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> {
23942394
23952395 let proc_res = new_rustdoc. document ( & compare_dir) ;
23962396 if !proc_res. status . success ( ) {
2397- proc_res. fatal ( Some ( "failed to run nightly rustdoc" ) , || ( ) ) ;
2397+ eprintln ! ( "failed to run nightly rustdoc" ) ;
2398+ return ;
23982399 }
23992400
24002401 #[ rustfmt:: skip]
@@ -2409,22 +2410,26 @@ impl<'test> TestCx<'test> {
24092410 ] ;
24102411 let tidy_dir = |dir| {
24112412 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+ }
24212424 } ;
24222425 for entry in walkdir:: WalkDir :: new ( dir) {
24232426 let entry = entry. expect ( "failed to read file" ) ;
24242427 if entry. file_type ( ) . is_file ( )
24252428 && entry. path ( ) . extension ( ) . and_then ( |p| p. to_str ( ) ) == Some ( "html" . into ( ) )
24262429 {
2427- tidy ( entry. path ( ) ) ;
2430+ if !tidy ( entry. path ( ) ) {
2431+ return ;
2432+ }
24282433 }
24292434 }
24302435 } ;
You can’t perform that action at this time.
0 commit comments