Skip to content

Commit aac383e

Browse files
committed
Use builder pattern instead of lots of arguments for EmitterWriter::new
1 parent 1f369f8 commit aac383e

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

src/parse/session.rs

+2-13
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::sync::atomic::{AtomicBool, Ordering};
44
use rustc_data_structures::sync::{Lrc, Send};
55
use rustc_errors::emitter::{Emitter, EmitterWriter};
66
use rustc_errors::translation::Translate;
7-
use rustc_errors::{ColorConfig, Diagnostic, Handler, Level as DiagnosticLevel, TerminalUrl};
7+
use rustc_errors::{ColorConfig, Diagnostic, Handler, Level as DiagnosticLevel};
88
use rustc_session::parse::ParseSess as RawParseSess;
99
use rustc_span::{
1010
source_map::{FilePathMapping, SourceMap},
@@ -139,18 +139,7 @@ fn default_handler(
139139
rustc_driver::DEFAULT_LOCALE_RESOURCES.to_vec(),
140140
false,
141141
);
142-
Box::new(EmitterWriter::stderr(
143-
emit_color,
144-
Some(source_map.clone()),
145-
None,
146-
fallback_bundle,
147-
false,
148-
false,
149-
None,
150-
false,
151-
false,
152-
TerminalUrl::No,
153-
))
142+
Box::new(EmitterWriter::stderr(emit_color, fallback_bundle).sm(Some(source_map.clone())))
154143
};
155144
Handler::with_emitter(Box::new(SilentOnIgnoredFilesEmitter {
156145
has_non_ignorable_parser_errors: false,

0 commit comments

Comments
 (0)