Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 20cb12e

Browse files
committed
Rename SilentEmitter::fatal_handler as SilentEmitter::fatal_dcx.
1 parent 55bafab commit 20cb12e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

compiler/rustc_errors/src/emitter.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -553,10 +553,10 @@ impl Emitter for EmitterWriter {
553553
}
554554

555555
/// An emitter that does nothing when emitting a non-fatal diagnostic.
556-
/// Fatal diagnostics are forwarded to `fatal_handler` to avoid silent
556+
/// Fatal diagnostics are forwarded to `fatal_dcx` to avoid silent
557557
/// failures of rustc, as witnessed e.g. in issue #89358.
558558
pub struct SilentEmitter {
559-
pub fatal_handler: DiagCtxt,
559+
pub fatal_dcx: DiagCtxt,
560560
pub fatal_note: Option<String>,
561561
}
562562

@@ -581,7 +581,7 @@ impl Emitter for SilentEmitter {
581581
if let Some(ref note) = self.fatal_note {
582582
d.note(note.clone());
583583
}
584-
self.fatal_handler.emit_diagnostic(d);
584+
self.fatal_dcx.emit_diagnostic(d);
585585
}
586586
}
587587
}

compiler/rustc_session/src/parse.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,8 @@ impl ParseSess {
255255
pub fn with_silent_emitter(fatal_note: Option<String>) -> Self {
256256
let fallback_bundle = fallback_fluent_bundle(Vec::new(), false);
257257
let sm = Lrc::new(SourceMap::new(FilePathMapping::empty()));
258-
let fatal_handler = DiagCtxt::with_tty_emitter(None, fallback_bundle).disable_warnings();
259-
let handler = DiagCtxt::with_emitter(Box::new(SilentEmitter { fatal_handler, fatal_note }))
258+
let fatal_dcx = DiagCtxt::with_tty_emitter(None, fallback_bundle).disable_warnings();
259+
let handler = DiagCtxt::with_emitter(Box::new(SilentEmitter { fatal_dcx, fatal_note }))
260260
.disable_warnings();
261261
ParseSess::with_dcx(handler, sm)
262262
}

0 commit comments

Comments
 (0)