Address review comments + Fix rebase

This commit is contained in:
Vadim Petrochenkov 2020-01-03 18:03:11 +04:00
parent 6bd6a20475
commit 5bf8105993
2 changed files with 4 additions and 3 deletions

View file

@ -746,7 +746,8 @@ impl HandlerInner {
!this.emitted_diagnostics.insert(diagnostic_hash)
};
// Only emit the diagnostic if we haven't already emitted an equivalent one.
// Only emit the diagnostic if we've been asked to deduplicate and
// haven't already emitted an equivalent diagnostic.
if !(self.flags.deduplicate_diagnostics && already_emitted(self)) {
self.emitter.emit_diagnostic(diagnostic);
if diagnostic.is_error() {

View file

@ -184,7 +184,7 @@ pub fn new_handler(
debugging_opts.terminal_width,
false,
)
.ui_testing(debugging_opts.ui_testing),
.ui_testing(debugging_opts.ui_testing()),
)
}
ErrorOutputType::Json { pretty, json_rendered } => {
@ -193,7 +193,7 @@ pub fn new_handler(
});
Box::new(
JsonEmitter::stderr(None, source_map, pretty, json_rendered, false)
.ui_testing(debugging_opts.ui_testing),
.ui_testing(debugging_opts.ui_testing()),
)
}
};