Skip to content

Commit c4d63c7

Browse files
committed
Rename AnnotateSnippetEmitterWriter as AnnotateSnippetEmitter.
For consistency with other `Emitter` impls.
1 parent cb9abca commit c4d63c7

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

compiler/rustc_errors/src/annotate_snippet_emitter_writer.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use rustc_span::source_map::SourceMap;
2020
use rustc_span::SourceFile;
2121

2222
/// Generates diagnostics using annotate-snippet
23-
pub struct AnnotateSnippetEmitterWriter {
23+
pub struct AnnotateSnippetEmitter {
2424
source_map: Option<Lrc<SourceMap>>,
2525
fluent_bundle: Option<Lrc<FluentBundle>>,
2626
fallback_bundle: LazyFallbackBundle,
@@ -33,7 +33,7 @@ pub struct AnnotateSnippetEmitterWriter {
3333
macro_backtrace: bool,
3434
}
3535

36-
impl Translate for AnnotateSnippetEmitterWriter {
36+
impl Translate for AnnotateSnippetEmitter {
3737
fn fluent_bundle(&self) -> Option<&Lrc<FluentBundle>> {
3838
self.fluent_bundle.as_ref()
3939
}
@@ -43,7 +43,7 @@ impl Translate for AnnotateSnippetEmitterWriter {
4343
}
4444
}
4545

46-
impl Emitter for AnnotateSnippetEmitterWriter {
46+
impl Emitter for AnnotateSnippetEmitter {
4747
/// The entry point for the diagnostics generation
4848
fn emit_diagnostic(&mut self, diag: &Diagnostic) {
4949
let fluent_args = to_fluent_args(diag.args());
@@ -99,7 +99,7 @@ fn annotation_type_for_level(level: Level) -> AnnotationType {
9999
}
100100
}
101101

102-
impl AnnotateSnippetEmitterWriter {
102+
impl AnnotateSnippetEmitter {
103103
pub fn new(
104104
source_map: Option<Lrc<SourceMap>>,
105105
fluent_bundle: Option<Lrc<FluentBundle>>,

compiler/rustc_session/src/session.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use rustc_data_structures::profiling::{SelfProfiler, SelfProfilerRef};
1717
use rustc_data_structures::sync::{
1818
AtomicU64, DynSend, DynSync, Lock, Lrc, OneThread, Ordering::SeqCst,
1919
};
20-
use rustc_errors::annotate_snippet_emitter_writer::AnnotateSnippetEmitterWriter;
20+
use rustc_errors::annotate_snippet_emitter_writer::AnnotateSnippetEmitter;
2121
use rustc_errors::emitter::{DynEmitter, HumanEmitter, HumanReadableErrorType};
2222
use rustc_errors::json::JsonEmitter;
2323
use rustc_errors::registry::Registry;
@@ -1000,7 +1000,7 @@ fn default_emitter(
10001000
let (short, color_config) = kind.unzip();
10011001

10021002
if let HumanReadableErrorType::AnnotateSnippet(_) = kind {
1003-
let emitter = AnnotateSnippetEmitterWriter::new(
1003+
let emitter = AnnotateSnippetEmitter::new(
10041004
Some(source_map),
10051005
bundle,
10061006
fallback_bundle,

0 commit comments

Comments
 (0)