Rename `SilentEmitter::fatal_handler` as `SilentEmitter::fatal_dcx`.
diff --git a/compiler/rustc_errors/src/emitter.rs b/compiler/rustc_errors/src/emitter.rs
index d88ccd3..3fb993c 100644
--- a/compiler/rustc_errors/src/emitter.rs
+++ b/compiler/rustc_errors/src/emitter.rs
@@ -553,10 +553,10 @@ fn supports_color(&self) -> bool {
}
/// An emitter that does nothing when emitting a non-fatal diagnostic.
-/// Fatal diagnostics are forwarded to `fatal_handler` to avoid silent
+/// Fatal diagnostics are forwarded to `fatal_dcx` to avoid silent
/// failures of rustc, as witnessed e.g. in issue #89358.
pub struct SilentEmitter {
- pub fatal_handler: DiagCtxt,
+ pub fatal_dcx: DiagCtxt,
pub fatal_note: Option<String>,
}
@@ -581,7 +581,7 @@ fn emit_diagnostic(&mut self, d: &Diagnostic) {
if let Some(ref note) = self.fatal_note {
d.note(note.clone());
}
- self.fatal_handler.emit_diagnostic(d);
+ self.fatal_dcx.emit_diagnostic(d);
}
}
}
diff --git a/compiler/rustc_session/src/parse.rs b/compiler/rustc_session/src/parse.rs
index b282d7d..c5c12f3 100644
--- a/compiler/rustc_session/src/parse.rs
+++ b/compiler/rustc_session/src/parse.rs
@@ -255,8 +255,8 @@ pub fn with_dcx(handler: DiagCtxt, source_map: Lrc<SourceMap>) -> Self {
pub fn with_silent_emitter(fatal_note: Option<String>) -> Self {
let fallback_bundle = fallback_fluent_bundle(Vec::new(), false);
let sm = Lrc::new(SourceMap::new(FilePathMapping::empty()));
- let fatal_handler = DiagCtxt::with_tty_emitter(None, fallback_bundle).disable_warnings();
- let handler = DiagCtxt::with_emitter(Box::new(SilentEmitter { fatal_handler, fatal_note }))
+ let fatal_dcx = DiagCtxt::with_tty_emitter(None, fallback_bundle).disable_warnings();
+ let handler = DiagCtxt::with_emitter(Box::new(SilentEmitter { fatal_dcx, fatal_note }))
.disable_warnings();
ParseSess::with_dcx(handler, sm)
}