@@ -61,13 +61,13 @@ impl HumanReadableErrorType {
61
61
self ,
62
62
mut dst : Box < dyn WriteColor + Send > ,
63
63
fallback_bundle : LazyFallbackBundle ,
64
- ) -> EmitterWriter {
64
+ ) -> HumanEmitter {
65
65
let ( short, color_config) = self . unzip ( ) ;
66
66
let color = color_config. suggests_using_colors ( ) ;
67
67
if !dst. supports_color ( ) && color {
68
68
dst = Box :: new ( Ansi :: new ( dst) ) ;
69
69
}
70
- EmitterWriter :: new ( dst, fallback_bundle) . short_message ( short)
70
+ HumanEmitter :: new ( dst, fallback_bundle) . short_message ( short)
71
71
}
72
72
}
73
73
@@ -196,13 +196,15 @@ pub trait Emitter: Translate {
196
196
fn emit_diagnostic ( & mut self , diag : & Diagnostic ) ;
197
197
198
198
/// Emit a notification that an artifact has been output.
199
- /// This is currently only supported for the JSON format,
200
- /// other formats can, and will, simply ignore it.
199
+ /// Currently only supported for the JSON format.
201
200
fn emit_artifact_notification ( & mut self , _path : & Path , _artifact_type : & str ) { }
202
201
202
+ /// Emit a report about future breakage.
203
+ /// Currently only supported for the JSON format.
203
204
fn emit_future_breakage_report ( & mut self , _diags : Vec < Diagnostic > ) { }
204
205
205
- /// Emit list of unused externs
206
+ /// Emit list of unused externs.
207
+ /// Currently only supported for the JSON format.
206
208
fn emit_unused_externs (
207
209
& mut self ,
208
210
_lint_level : rustc_lint_defs:: Level ,
@@ -501,7 +503,7 @@ pub trait Emitter: Translate {
501
503
}
502
504
}
503
505
504
- impl Translate for EmitterWriter {
506
+ impl Translate for HumanEmitter {
505
507
fn fluent_bundle ( & self ) -> Option < & Lrc < FluentBundle > > {
506
508
self . fluent_bundle . as_ref ( )
507
509
}
@@ -511,7 +513,7 @@ impl Translate for EmitterWriter {
511
513
}
512
514
}
513
515
514
- impl Emitter for EmitterWriter {
516
+ impl Emitter for HumanEmitter {
515
517
fn source_map ( & self ) -> Option < & Lrc < SourceMap > > {
516
518
self . sm . as_ref ( )
517
519
}
@@ -622,7 +624,7 @@ impl ColorConfig {
622
624
623
625
/// Handles the writing of `HumanReadableErrorType::Default` and `HumanReadableErrorType::Short`
624
626
#[ derive( Setters ) ]
625
- pub struct EmitterWriter {
627
+ pub struct HumanEmitter {
626
628
#[ setters( skip) ]
627
629
dst : IntoDynSyncSend < Destination > ,
628
630
sm : Option < Lrc < SourceMap > > ,
@@ -647,14 +649,14 @@ pub struct FileWithAnnotatedLines {
647
649
multiline_depth : usize ,
648
650
}
649
651
650
- impl EmitterWriter {
651
- pub fn stderr ( color_config : ColorConfig , fallback_bundle : LazyFallbackBundle ) -> EmitterWriter {
652
+ impl HumanEmitter {
653
+ pub fn stderr ( color_config : ColorConfig , fallback_bundle : LazyFallbackBundle ) -> HumanEmitter {
652
654
let dst = from_stderr ( color_config) ;
653
655
Self :: create ( dst, fallback_bundle)
654
656
}
655
657
656
- fn create ( dst : Destination , fallback_bundle : LazyFallbackBundle ) -> EmitterWriter {
657
- EmitterWriter {
658
+ fn create ( dst : Destination , fallback_bundle : LazyFallbackBundle ) -> HumanEmitter {
659
+ HumanEmitter {
658
660
dst : IntoDynSyncSend ( dst) ,
659
661
sm : None ,
660
662
fluent_bundle : None ,
@@ -673,7 +675,7 @@ impl EmitterWriter {
673
675
pub fn new (
674
676
dst : Box < dyn WriteColor + Send > ,
675
677
fallback_bundle : LazyFallbackBundle ,
676
- ) -> EmitterWriter {
678
+ ) -> HumanEmitter {
677
679
Self :: create ( dst, fallback_bundle)
678
680
}
679
681
0 commit comments