diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-02-29 11:40:50 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-02-29 16:30:12 +1100 |
| commit | f9eef38e32f5e362006122d4a11d8e1f41e2f033 (patch) | |
| tree | 9357eca5622bfd48a9dbb700fc7005a388368c21 /compiler/rustc_errors/src | |
| parent | ca5b79ddf7325fa7f6a88c170edbffa1757b149e (diff) | |
| download | rust-f9eef38e32f5e362006122d4a11d8e1f41e2f033.tar.gz rust-f9eef38e32f5e362006122d4a11d8e1f41e2f033.zip | |
Inline and remove `DiagCtxt::with_tty_emitter`
It only has two call sites, and one of those doesn't set the source map.
Diffstat (limited to 'compiler/rustc_errors/src')
| -rw-r--r-- | compiler/rustc_errors/src/lib.rs | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index bb6f031cec6..72b3c88ee03 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -59,11 +59,11 @@ pub use snippet::Style; // See https://github.com/rust-lang/rust/pull/115393. pub use termcolor::{Color, ColorSpec, WriteColor}; -use emitter::{is_case_difference, DynEmitter, Emitter, HumanEmitter}; +use emitter::{is_case_difference, DynEmitter, Emitter}; use registry::Registry; use rustc_data_structures::fx::{FxHashSet, FxIndexMap, FxIndexSet}; use rustc_data_structures::stable_hasher::{Hash128, StableHasher}; -use rustc_data_structures::sync::{Lock, Lrc}; +use rustc_data_structures::sync::Lock; use rustc_data_structures::AtomicRef; use rustc_lint_defs::LintExpectationId; use rustc_span::source_map::SourceMap; @@ -586,13 +586,6 @@ impl Drop for DiagCtxtInner { } impl DiagCtxt { - pub fn with_tty_emitter( - sm: Option<Lrc<SourceMap>>, - fallback_bundle: LazyFallbackBundle, - ) -> Self { - let emitter = Box::new(HumanEmitter::stderr(ColorConfig::Auto, fallback_bundle).sm(sm)); - Self::with_emitter(emitter) - } pub fn disable_warnings(mut self) -> Self { self.inner.get_mut().flags.can_emit_warnings = false; self |
