diff --git a/src/librustc_errors/lib.rs b/src/librustc_errors/lib.rs index 999c3470e71e..2279ed859540 100644 --- a/src/librustc_errors/lib.rs +++ b/src/librustc_errors/lib.rs @@ -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() { diff --git a/src/librustdoc/core.rs b/src/librustdoc/core.rs index c48523961de0..5f2ce34afeec 100644 --- a/src/librustdoc/core.rs +++ b/src/librustdoc/core.rs @@ -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()), ) } };