@@ -771,20 +771,20 @@ impl<'test> TestCx<'test> {
771
771
unexpected. len( ) ,
772
772
not_found. len( )
773
773
) ) ;
774
- println ! ( "status: {}\n command: {}\n " , proc_res. status, proc_res. cmdline) ;
774
+ eprintln ! ( "status: {}\n command: {}\n " , proc_res. status, proc_res. cmdline) ;
775
775
if !unexpected. is_empty ( ) {
776
- println ! ( "{}" , "--- unexpected errors (from JSON output) ---" . green( ) ) ;
776
+ eprintln ! ( "{}" , "--- unexpected errors (from JSON output) ---" . green( ) ) ;
777
777
for error in & unexpected {
778
- println ! ( "{}" , error. render_for_expected( ) ) ;
778
+ eprintln ! ( "{}" , error. render_for_expected( ) ) ;
779
779
}
780
- println ! ( "{}" , "---" . green( ) ) ;
780
+ eprintln ! ( "{}" , "---" . green( ) ) ;
781
781
}
782
782
if !not_found. is_empty ( ) {
783
- println ! ( "{}" , "--- not found errors (from test file) ---" . red( ) ) ;
783
+ eprintln ! ( "{}" , "--- not found errors (from test file) ---" . red( ) ) ;
784
784
for error in & not_found {
785
- println ! ( "{}" , error. render_for_expected( ) ) ;
785
+ eprintln ! ( "{}" , error. render_for_expected( ) ) ;
786
786
}
787
- println ! ( "{}" , "---\n " . red( ) ) ;
787
+ eprintln ! ( "{}" , "---\n " . red( ) ) ;
788
788
}
789
789
panic ! ( "errors differ from expected" ) ;
790
790
}
@@ -1873,18 +1873,18 @@ impl<'test> TestCx<'test> {
1873
1873
1874
1874
fn maybe_dump_to_stdout ( & self , out : & str , err : & str ) {
1875
1875
if self . config . verbose {
1876
- println ! ( "------stdout------------------------------" ) ;
1877
- println ! ( "{}" , out) ;
1878
- println ! ( "------stderr------------------------------" ) ;
1879
- println ! ( "{}" , err) ;
1880
- println ! ( "------------------------------------------" ) ;
1876
+ eprintln ! ( "------stdout------------------------------" ) ;
1877
+ eprintln ! ( "{}" , out) ;
1878
+ eprintln ! ( "------stderr------------------------------" ) ;
1879
+ eprintln ! ( "{}" , err) ;
1880
+ eprintln ! ( "------------------------------------------" ) ;
1881
1881
}
1882
1882
}
1883
1883
1884
1884
fn error ( & self , err : & str ) {
1885
1885
match self . revision {
1886
- Some ( rev) => println ! ( "\n error in revision `{}`: {}" , rev, err) ,
1887
- None => println ! ( "\n error: {}" , err) ,
1886
+ Some ( rev) => eprintln ! ( "\n error in revision `{}`: {}" , rev, err) ,
1887
+ None => eprintln ! ( "\n error: {}" , err) ,
1888
1888
}
1889
1889
}
1890
1890
@@ -1969,7 +1969,7 @@ impl<'test> TestCx<'test> {
1969
1969
if !self . config . has_html_tidy {
1970
1970
return ;
1971
1971
}
1972
- println ! ( "info: generating a diff against nightly rustdoc" ) ;
1972
+ eprintln ! ( "info: generating a diff against nightly rustdoc" ) ;
1973
1973
1974
1974
let suffix =
1975
1975
self . safe_revision ( ) . map_or ( "nightly" . into ( ) , |path| path. to_owned ( ) + "-nightly" ) ;
@@ -2079,7 +2079,7 @@ impl<'test> TestCx<'test> {
2079
2079
. output ( )
2080
2080
. unwrap ( ) ;
2081
2081
assert ! ( output. status. success( ) ) ;
2082
- println ! ( "{}" , String :: from_utf8_lossy( & output. stdout) ) ;
2082
+ eprintln ! ( "{}" , String :: from_utf8_lossy( & output. stdout) ) ;
2083
2083
eprintln ! ( "{}" , String :: from_utf8_lossy( & output. stderr) ) ;
2084
2084
} else {
2085
2085
use colored:: Colorize ;
@@ -2479,7 +2479,7 @@ impl<'test> TestCx<'test> {
2479
2479
)"#
2480
2480
)
2481
2481
. replace_all ( & output, |caps : & Captures < ' _ > | {
2482
- println ! ( "{}" , & caps[ 0 ] ) ;
2482
+ eprintln ! ( "{}" , & caps[ 0 ] ) ;
2483
2483
caps[ 0 ] . replace ( r"\" , "/" )
2484
2484
} )
2485
2485
. replace ( "\r \n " , "\n " )
@@ -2578,16 +2578,16 @@ impl<'test> TestCx<'test> {
2578
2578
if let Err ( err) = fs:: write ( & actual_path, & actual) {
2579
2579
self . fatal ( & format ! ( "failed to write {stream} to `{actual_path:?}`: {err}" , ) ) ;
2580
2580
}
2581
- println ! ( "Saved the actual {stream} to {actual_path:?}" ) ;
2581
+ eprintln ! ( "Saved the actual {stream} to {actual_path:?}" ) ;
2582
2582
2583
2583
let expected_path =
2584
2584
expected_output_path ( self . testpaths , self . revision , & self . config . compare_mode , stream) ;
2585
2585
2586
2586
if !self . config . bless {
2587
2587
if expected. is_empty ( ) {
2588
- println ! ( "normalized {}:\n {}\n " , stream, actual) ;
2588
+ eprintln ! ( "normalized {}:\n {}\n " , stream, actual) ;
2589
2589
} else {
2590
- println ! ( "diff of {stream}:\n " ) ;
2590
+ eprintln ! ( "diff of {stream}:\n " ) ;
2591
2591
if let Some ( diff_command) = self . config . diff_command . as_deref ( ) {
2592
2592
let mut args = diff_command. split_whitespace ( ) ;
2593
2593
let name = args. next ( ) . unwrap ( ) ;
@@ -2622,10 +2622,10 @@ impl<'test> TestCx<'test> {
2622
2622
if let Err ( err) = fs:: write ( & expected_path, & actual) {
2623
2623
self . fatal ( & format ! ( "failed to write {stream} to `{expected_path:?}`: {err}" ) ) ;
2624
2624
}
2625
- println ! ( "Blessing the {stream} of {test_name} in {expected_path:?}" ) ;
2625
+ eprintln ! ( "Blessing the {stream} of {test_name} in {expected_path:?}" ) ;
2626
2626
}
2627
2627
2628
- println ! ( "\n The actual {0} differed from the expected {0}." , stream) ;
2628
+ eprintln ! ( "\n The actual {0} differed from the expected {0}." , stream) ;
2629
2629
2630
2630
if self . config . bless { 0 } else { 1 }
2631
2631
}
@@ -2704,7 +2704,7 @@ impl<'test> TestCx<'test> {
2704
2704
fs:: create_dir_all ( & incremental_dir) . unwrap ( ) ;
2705
2705
2706
2706
if self . config . verbose {
2707
- println ! ( "init_incremental_test: incremental_dir={}" , incremental_dir. display( ) ) ;
2707
+ eprintln ! ( "init_incremental_test: incremental_dir={}" , incremental_dir. display( ) ) ;
2708
2708
}
2709
2709
}
2710
2710
@@ -2762,7 +2762,7 @@ impl ProcRes {
2762
2762
}
2763
2763
}
2764
2764
2765
- println ! (
2765
+ eprintln ! (
2766
2766
"status: {}\n command: {}\n {}\n {}\n " ,
2767
2767
self . status,
2768
2768
self . cmdline,
@@ -2773,7 +2773,7 @@ impl ProcRes {
2773
2773
2774
2774
pub fn fatal ( & self , err : Option < & str > , on_failure : impl FnOnce ( ) ) -> ! {
2775
2775
if let Some ( e) = err {
2776
- println ! ( "\n error: {}" , e) ;
2776
+ eprintln ! ( "\n error: {}" , e) ;
2777
2777
}
2778
2778
self . print_info ( ) ;
2779
2779
on_failure ( ) ;
0 commit comments