File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
src/tools/compiletest/src Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -2424,7 +2424,10 @@ impl<'test> TestCx<'test> {
24242424 ) ;
24252425
24262426 if !res. status . success ( ) {
2427- self . fatal_proc_rec ( "jsondocck failed!" , & res)
2427+ self . fatal_proc_rec_with_ctx ( "jsondocck failed!" , & res, |_| {
2428+ println ! ( "Rustdoc Output:" ) ;
2429+ proc_res. print_info ( ) ;
2430+ } )
24282431 }
24292432
24302433 let mut json_out = out_dir. join ( self . testpaths . file . file_stem ( ) . unwrap ( ) ) ;
@@ -3738,10 +3741,7 @@ pub struct ProcRes {
37383741}
37393742
37403743impl ProcRes {
3741- pub fn fatal ( & self , err : Option < & str > , on_failure : impl FnOnce ( ) ) -> ! {
3742- if let Some ( e) = err {
3743- println ! ( "\n error: {}" , e) ;
3744- }
3744+ pub fn print_info ( & self ) {
37453745 print ! (
37463746 "\
37473747 status: {}\n \
@@ -3760,6 +3760,13 @@ impl ProcRes {
37603760 json:: extract_rendered( & self . stdout) ,
37613761 json:: extract_rendered( & self . stderr) ,
37623762 ) ;
3763+ }
3764+
3765+ pub fn fatal ( & self , err : Option < & str > , on_failure : impl FnOnce ( ) ) -> ! {
3766+ if let Some ( e) = err {
3767+ println ! ( "\n error: {}" , e) ;
3768+ }
3769+ self . print_info ( ) ;
37633770 on_failure ( ) ;
37643771 // Use resume_unwind instead of panic!() to prevent a panic message + backtrace from
37653772 // compiletest, which is unnecessary noise.
You can’t perform that action at this time.
0 commit comments