File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -469,14 +469,17 @@ impl Handler {
469
469
/// NOTE: *do not* call this function from rustc. It is only meant to be called from external
470
470
/// tools that want to reuse a `Parser` cleaning the previously emitted diagnostics as well as
471
471
/// the overall count of emitted error diagnostics.
472
- // FIXME: this does not clear inner entirely
473
472
pub fn reset_err_count ( & self ) {
474
473
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 ;
478
474
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 ( ) ;
480
483
}
481
484
482
485
/// 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