File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -469,14 +469,17 @@ impl Handler {
469469 /// NOTE: *do not* call this function from rustc. It is only meant to be called from external
470470 /// tools that want to reuse a `Parser` cleaning the previously emitted diagnostics as well as
471471 /// the overall count of emitted error diagnostics.
472- // FIXME: this does not clear inner entirely
473472 pub fn reset_err_count ( & self ) {
474473 let mut inner = self . inner . borrow_mut ( ) ;
475- // actually frees the underlying memory (which `clear` would not do)
476- inner. emitted_diagnostics = Default :: default ( ) ;
477- inner. deduplicated_err_count = 0 ;
478474 inner. err_count = 0 ;
479- inner. stashed_diagnostics . clear ( ) ;
475+ inner. deduplicated_err_count = 0 ;
476+
477+ // actually free the underlying memory (which `clear` would not do)
478+ inner. delayed_span_bugs = Default :: default ( ) ;
479+ inner. taught_diagnostics = Default :: default ( ) ;
480+ inner. emitted_diagnostic_codes = Default :: default ( ) ;
481+ inner. emitted_diagnostics = Default :: default ( ) ;
482+ inner. stashed_diagnostics = Default :: default ( ) ;
480483 }
481484
482485 /// Stash a given diagnostic with the given `Span` and `StashKey` as the key for later stealing.
You can’t perform that action at this time.
0 commit comments