@@ -215,9 +215,6 @@ struct CoverageSpansGenerator<'a> {
215215 /// is mutated.
216216 prev_original_span : Span ,
217217
218- /// A copy of the expn_span from the prior iteration.
219- prev_expn_span : Option < Span > ,
220-
221218 /// One or more `CoverageSpan`s with the same `Span` but different `BasicCoverageBlock`s, and
222219 /// no `BasicCoverageBlock` in this list dominates another `BasicCoverageBlock` in the list.
223220 /// If a new `curr` span also fits this criteria (compared to an existing list of
@@ -276,7 +273,6 @@ impl<'a> CoverageSpansGenerator<'a> {
276273 curr_original_span : DUMMY_SP ,
277274 some_prev : None ,
278275 prev_original_span : DUMMY_SP ,
279- prev_expn_span : None ,
280276 pending_dups : Vec :: new ( ) ,
281277 refined_spans : Vec :: with_capacity ( basic_coverage_blocks. num_nodes ( ) * 2 ) ,
282278 } ;
@@ -399,8 +395,8 @@ impl<'a> CoverageSpansGenerator<'a> {
399395 /// span that ends just after the macro name and its subsequent `!`.
400396 fn maybe_push_macro_name_span ( & mut self ) {
401397 let Some ( visible_macro) = self . curr ( ) . visible_macro ( self . body_span ) else { return } ;
402- if let Some ( prev_expn_span ) = & self . prev_expn_span
403- && prev_expn_span . ctxt ( ) == self . curr ( ) . expn_span . ctxt ( )
398+ if let Some ( prev ) = & self . some_prev
399+ && prev . expn_span . ctxt ( ) == self . curr ( ) . expn_span . ctxt ( )
404400 {
405401 return ;
406402 }
@@ -479,7 +475,6 @@ impl<'a> CoverageSpansGenerator<'a> {
479475 /// Advance `prev` to `curr` (if any), and `curr` to the next `CoverageSpan` in sorted order.
480476 fn next_coverage_span ( & mut self ) -> bool {
481477 if let Some ( curr) = self . some_curr . take ( ) {
482- self . prev_expn_span = Some ( curr. expn_span ) ;
483478 self . some_prev = Some ( curr) ;
484479 self . prev_original_span = self . curr_original_span ;
485480 }
0 commit comments