diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-07-25 10:02:16 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-07-25 13:30:04 +0000 |
| commit | b7f8eba9fd6c2000a3d7a7a7cf86607d2730dbf8 (patch) | |
| tree | f63b12265ef6cab6f6cb936b4e74aeb85d397970 /compiler/rustc_errors/src/lib.rs | |
| parent | 8d60f7573d375e4405d2ab0c7b5f20f2abf201dc (diff) | |
| download | rust-b7f8eba9fd6c2000a3d7a7a7cf86607d2730dbf8.tar.gz rust-b7f8eba9fd6c2000a3d7a7a7cf86607d2730dbf8.zip | |
Inline a function that is only used once
Diffstat (limited to 'compiler/rustc_errors/src/lib.rs')
| -rw-r--r-- | compiler/rustc_errors/src/lib.rs | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index 93f77b9cccd..bf19e0587a2 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -553,29 +553,13 @@ impl Handler { sm: Option<Lrc<SourceMap>>, fallback_bundle: LazyFallbackBundle, ) -> Self { - Self::with_tty_emitter_and_flags( + let flags = + HandlerFlags { can_emit_warnings, treat_err_as_bug: None, ..Default::default() }; + let emitter = Box::new(EmitterWriter::stderr( ColorConfig::Auto, sm, None, fallback_bundle, - HandlerFlags { can_emit_warnings, treat_err_as_bug: None, ..Default::default() }, - None, - ) - } - - pub fn with_tty_emitter_and_flags( - color_config: ColorConfig, - sm: Option<Lrc<SourceMap>>, - fluent_bundle: Option<Lrc<FluentBundle>>, - fallback_bundle: LazyFallbackBundle, - flags: HandlerFlags, - ice_file: Option<PathBuf>, - ) -> Self { - let emitter = Box::new(EmitterWriter::stderr( - color_config, - sm, - fluent_bundle, - fallback_bundle, false, false, None, @@ -583,7 +567,7 @@ impl Handler { flags.track_diagnostics, TerminalUrl::No, )); - Self::with_emitter_and_flags(emitter, flags, ice_file) + Self::with_emitter_and_flags(emitter, flags, None) } pub fn with_emitter( |
