This repository was archived by the owner on May 28, 2025. It is now read-only.
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 @@ -2412,7 +2412,10 @@ impl<'test> TestCx<'test> {
24122412 ) ;
24132413
24142414 if !res. status . success ( ) {
2415- self . fatal_proc_rec ( "jsondocck failed!" , & res)
2415+ self . fatal_proc_rec_with_ctx ( "jsondocck failed!" , & res, |_| {
2416+ println ! ( "Rustdoc Output:" ) ;
2417+ proc_res. print_info ( ) ;
2418+ } )
24162419 }
24172420
24182421 let mut json_out = out_dir. join ( self . testpaths . file . file_stem ( ) . unwrap ( ) ) ;
@@ -3759,10 +3762,7 @@ pub struct ProcRes {
37593762}
37603763
37613764impl ProcRes {
3762- pub fn fatal ( & self , err : Option < & str > , on_failure : impl FnOnce ( ) ) -> ! {
3763- if let Some ( e) = err {
3764- println ! ( "\n error: {}" , e) ;
3765- }
3765+ pub fn print_info ( & self ) {
37663766 print ! (
37673767 "\
37683768 status: {}\n \
@@ -3781,6 +3781,13 @@ impl ProcRes {
37813781 json:: extract_rendered( & self . stdout) ,
37823782 json:: extract_rendered( & self . stderr) ,
37833783 ) ;
3784+ }
3785+
3786+ pub fn fatal ( & self , err : Option < & str > , on_failure : impl FnOnce ( ) ) -> ! {
3787+ if let Some ( e) = err {
3788+ println ! ( "\n error: {}" , e) ;
3789+ }
3790+ self . print_info ( ) ;
37843791 on_failure ( ) ;
37853792 // Use resume_unwind instead of panic!() to prevent a panic message + backtrace from
37863793 // compiletest, which is unnecessary noise.
You can’t perform that action at this time.
0 commit comments