File tree Expand file tree Collapse file tree 1 file changed +5
-15
lines changed Expand file tree Collapse file tree 1 file changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -355,7 +355,6 @@ impl Session {
355355
356356 /// Analogous to calling methods on the given `DiagnosticBuilder`, but
357357 /// deduplicates on lint ID, span (if any), and message for this `Session`
358- /// if we're not outputting in JSON mode.
359358 fn diag_once < ' a , ' b > ( & ' a self ,
360359 diag_builder : & ' b mut DiagnosticBuilder < ' a > ,
361360 method : DiagnosticBuilderMethod ,
@@ -371,20 +370,11 @@ impl Session {
371370 }
372371 } ;
373372
374- match self . opts . error_format {
375- // when outputting JSON for tool consumption, the tool might want
376- // the duplicates
377- config:: ErrorOutputType :: Json ( _) => {
378- do_method ( )
379- } ,
380- _ => {
381- let lint_id = DiagnosticMessageId :: LintId ( lint:: LintId :: of ( lint) ) ;
382- let id_span_message = ( lint_id, span, message. to_owned ( ) ) ;
383- let fresh = self . one_time_diagnostics . borrow_mut ( ) . insert ( id_span_message) ;
384- if fresh {
385- do_method ( )
386- }
387- }
373+ let lint_id = DiagnosticMessageId :: LintId ( lint:: LintId :: of ( lint) ) ;
374+ let id_span_message = ( lint_id, span, message. to_owned ( ) ) ;
375+ let fresh = self . one_time_diagnostics . borrow_mut ( ) . insert ( id_span_message) ;
376+ if fresh {
377+ do_method ( )
388378 }
389379 }
390380
You can’t perform that action at this time.
0 commit comments