diff options
| author | Cameron Steffen <cam.steffen94@gmail.com> | 2025-06-17 16:59:57 -0500 |
|---|---|---|
| committer | Cameron Steffen <cam.steffen94@gmail.com> | 2025-06-19 13:03:17 -0500 |
| commit | 316f63bc48a9bfe26b2a8fc06e7eeef45ac2b7aa (patch) | |
| tree | 73a1b0a5fcb4effec25adf27afcea2e69297fbed /compiler/rustc_errors | |
| parent | 07b9bb1855596ac84a80d898b40c4b403f1dcc3f (diff) | |
| download | rust-316f63bc48a9bfe26b2a8fc06e7eeef45ac2b7aa.tar.gz rust-316f63bc48a9bfe26b2a8fc06e7eeef45ac2b7aa.zip | |
Rename SilentEmitter -> FatalOnlyEmitter
Diffstat (limited to 'compiler/rustc_errors')
| -rw-r--r-- | compiler/rustc_errors/src/emitter.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_errors/src/lib.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_errors/src/emitter.rs b/compiler/rustc_errors/src/emitter.rs index 494f15cc639..4464b45775a 100644 --- a/compiler/rustc_errors/src/emitter.rs +++ b/compiler/rustc_errors/src/emitter.rs @@ -543,13 +543,13 @@ impl Emitter for HumanEmitter { /// An emitter that does nothing when emitting a non-fatal diagnostic. /// Fatal diagnostics are forwarded to `fatal_emitter` to avoid silent /// failures of rustc, as witnessed e.g. in issue #89358. -pub struct SilentEmitter { +pub struct FatalOnlyEmitter { pub fatal_emitter: Box<dyn Emitter + DynSend>, pub fatal_note: Option<String>, pub emit_fatal_diagnostic: bool, } -impl Emitter for SilentEmitter { +impl Emitter for FatalOnlyEmitter { fn source_map(&self) -> Option<&SourceMap> { None } diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index 70f294b696a..831a50efa27 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -770,7 +770,7 @@ impl DiagCtxt { let mut inner = self.inner.borrow_mut(); let mut prev_emitter = Box::new(FalseEmitter) as Box<dyn Emitter + DynSend>; std::mem::swap(&mut inner.emitter, &mut prev_emitter); - let new_emitter = Box::new(emitter::SilentEmitter { + let new_emitter = Box::new(emitter::FatalOnlyEmitter { fatal_emitter: prev_emitter, fatal_note, emit_fatal_diagnostic, |
