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 @@ -2412,7 +2412,10 @@ impl<'test> TestCx<'test> {
2412
2412
) ;
2413
2413
2414
2414
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
+ } )
2416
2419
}
2417
2420
2418
2421
let mut json_out = out_dir. join ( self . testpaths . file . file_stem ( ) . unwrap ( ) ) ;
@@ -3759,10 +3762,7 @@ pub struct ProcRes {
3759
3762
}
3760
3763
3761
3764
impl 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 ) {
3766
3766
print ! (
3767
3767
"\
3768
3768
status: {}\n \
@@ -3781,6 +3781,13 @@ impl ProcRes {
3781
3781
json:: extract_rendered( & self . stdout) ,
3782
3782
json:: extract_rendered( & self . stderr) ,
3783
3783
) ;
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 ( ) ;
3784
3791
on_failure ( ) ;
3785
3792
// Use resume_unwind instead of panic!() to prevent a panic message + backtrace from
3786
3793
// compiletest, which is unnecessary noise.
You can’t perform that action at this time.
0 commit comments