@@ -45,8 +45,12 @@ impl<T: Write> PrettyFormatter<T> {
4545 self . write_short_result ( "FAILED" , term:: color:: RED )
4646 }
4747
48- pub fn write_ignored ( & mut self ) -> io:: Result < ( ) > {
49- self . write_short_result ( "ignored" , term:: color:: YELLOW )
48+ pub fn write_ignored ( & mut self , may_message : Option < & ' static str > ) -> io:: Result < ( ) > {
49+ if let Some ( message) = may_message {
50+ self . write_short_result ( & format ! ( "ignored, {}" , message) , term:: color:: YELLOW )
51+ } else {
52+ self . write_short_result ( "ignored" , term:: color:: YELLOW )
53+ }
5054 }
5155
5256 pub fn write_time_failed ( & mut self ) -> io:: Result < ( ) > {
@@ -59,10 +63,10 @@ impl<T: Write> PrettyFormatter<T> {
5963
6064 pub fn write_short_result (
6165 & mut self ,
62- result : & str ,
66+ result : impl AsRef < str > ,
6367 color : term:: color:: Color ,
6468 ) -> io:: Result < ( ) > {
65- self . write_pretty ( result, color)
69+ self . write_pretty ( result. as_ref ( ) , color)
6670 }
6771
6872 pub fn write_pretty ( & mut self , word : & str , color : term:: color:: Color ) -> io:: Result < ( ) > {
@@ -214,7 +218,12 @@ impl<T: Write> OutputFormatter for PrettyFormatter<T> {
214218 match * result {
215219 TestResult :: TrOk => self . write_ok ( ) ?,
216220 TestResult :: TrFailed | TestResult :: TrFailedMsg ( _) => self . write_failed ( ) ?,
217- TestResult :: TrIgnored => self . write_ignored ( ) ?,
221+ TestResult :: TrIgnored => {
222+ #[ cfg( not( bootstrap) ) ]
223+ self . write_ignored ( desc. ignore_message ) ?;
224+ #[ cfg( bootstrap) ]
225+ self . write_ignored ( None ) ?;
226+ }
218227 TestResult :: TrBench ( ref bs) => {
219228 self . write_bench ( ) ?;
220229 self . write_plain ( & format ! ( ": {}" , fmt_bench_samples( bs) ) ) ?;
0 commit comments