File tree 1 file changed +12
-5
lines changed
src/tools/compiletest/src
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> {
2424
2424
) ;
2425
2425
2426
2426
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
+ } )
2428
2431
}
2429
2432
2430
2433
let mut json_out = out_dir. join ( self . testpaths . file . file_stem ( ) . unwrap ( ) ) ;
@@ -3738,10 +3741,7 @@ pub struct ProcRes {
3738
3741
}
3739
3742
3740
3743
impl 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 ) {
3745
3745
print ! (
3746
3746
"\
3747
3747
status: {}\n \
@@ -3760,6 +3760,13 @@ impl ProcRes {
3760
3760
json:: extract_rendered( & self . stdout) ,
3761
3761
json:: extract_rendered( & self . stderr) ,
3762
3762
) ;
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 ( ) ;
3763
3770
on_failure ( ) ;
3764
3771
// Use resume_unwind instead of panic!() to prevent a panic message + backtrace from
3765
3772
// compiletest, which is unnecessary noise.
You can’t perform that action at this time.
0 commit comments