diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-02-29 10:17:28 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-02-29 16:30:12 +1100 |
| commit | d3727413ed96a8feedcca9931b9b8abb72632492 (patch) | |
| tree | 7c952e3d00d461b5b286079aab64d6f5562ec123 /compiler/rustc_errors/src | |
| parent | 880c1c585f1252a8b63b402b44def940cac6f134 (diff) | |
| download | rust-d3727413ed96a8feedcca9931b9b8abb72632492.tar.gz rust-d3727413ed96a8feedcca9931b9b8abb72632492.zip | |
Merge HumanEmitter::{new,create}.
They have the same signature, and the former just calls the latter.
Diffstat (limited to 'compiler/rustc_errors/src')
| -rw-r--r-- | compiler/rustc_errors/src/emitter.rs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/compiler/rustc_errors/src/emitter.rs b/compiler/rustc_errors/src/emitter.rs index cbe973330dc..89015a3ca2e 100644 --- a/compiler/rustc_errors/src/emitter.rs +++ b/compiler/rustc_errors/src/emitter.rs @@ -665,11 +665,10 @@ pub(crate) struct FileWithAnnotatedLines { impl HumanEmitter { pub fn stderr(color_config: ColorConfig, fallback_bundle: LazyFallbackBundle) -> HumanEmitter { - let dst = from_stderr(color_config); - Self::create(dst, fallback_bundle) + Self::new(from_stderr(color_config), fallback_bundle) } - fn create(dst: Destination, fallback_bundle: LazyFallbackBundle) -> HumanEmitter { + pub fn new(dst: Destination, fallback_bundle: LazyFallbackBundle) -> HumanEmitter { HumanEmitter { dst: IntoDynSyncSend(dst), sm: None, @@ -686,10 +685,6 @@ impl HumanEmitter { } } - pub fn new(dst: Destination, fallback_bundle: LazyFallbackBundle) -> HumanEmitter { - Self::create(dst, fallback_bundle) - } - fn maybe_anonymized(&self, line_num: usize) -> Cow<'static, str> { if self.ui_testing { Cow::Borrowed(ANONYMIZED_LINE_NUM) |
