@@ -215,9 +215,6 @@ struct CoverageSpansGenerator<'a> {
215
215
/// is mutated.
216
216
prev_original_span: Span,
217
217
218
- /// A copy of the expn_span from the prior iteration.
219
- prev_expn_span: Option<Span>,
220
-
221
218
/// One or more `CoverageSpan`s with the same `Span` but different `BasicCoverageBlock`s, and
222
219
/// no `BasicCoverageBlock` in this list dominates another `BasicCoverageBlock` in the list.
223
220
/// If a new `curr` span also fits this criteria (compared to an existing list of
@@ -276,7 +273,6 @@ impl<'a> CoverageSpansGenerator<'a> {
276
273
curr_original_span: DUMMY_SP,
277
274
some_prev: None,
278
275
prev_original_span: DUMMY_SP,
279
- prev_expn_span: None,
280
276
pending_dups: Vec::new(),
281
277
refined_spans: Vec::with_capacity(basic_coverage_blocks.num_nodes() * 2),
282
278
};
@@ -397,8 +393,8 @@ impl<'a> CoverageSpansGenerator<'a> {
397
393
398
394
fn check_invoked_macro_name_span(&mut self) {
399
395
let Some(visible_macro) = self.curr().visible_macro(self.body_span) else { return };
400
- if let Some(prev_expn_span ) = &self.prev_expn_span
401
- && prev_expn_span .ctxt() == self.curr().expn_span.ctxt()
396
+ if let Some(prev ) = &self.some_prev
397
+ && prev.expn_span .ctxt() == self.curr().expn_span.ctxt()
402
398
{
403
399
return;
404
400
}
@@ -477,7 +473,6 @@ impl<'a> CoverageSpansGenerator<'a> {
477
473
/// Advance `prev` to `curr` (if any), and `curr` to the next `CoverageSpan` in sorted order.
478
474
fn next_coverage_span(&mut self) -> bool {
479
475
if let Some(curr) = self.some_curr.take() {
480
- self.prev_expn_span = Some(curr.expn_span);
481
476
self.some_prev = Some(curr);
482
477
self.prev_original_span = self.curr_original_span;
483
478
}
0 commit comments