Skip to content

Commit 9b6ce4f

Browse files
committed
coverage: Rename check_pending_dups to maybe_flush_pending_dups
This method's main responsibility is to flush the pending dups into refined spans, if appropriate.
1 parent 46c545c commit 9b6ce4f

File tree

1 file changed

+2
-2
lines changed
  • compiler/rustc_mir_transform/src/coverage

1 file changed

+2
-2
lines changed

compiler/rustc_mir_transform/src/coverage/spans.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ impl<'a> CoverageSpansGenerator<'a> {
462462
/// `pending_dups` could have as few as one span)
463463
/// In either case, no more spans will match the span of `pending_dups`, so
464464
/// add the `pending_dups` if they don't overlap `curr`, and clear the list.
465-
fn check_pending_dups(&mut self) {
465+
fn maybe_flush_pending_dups(&mut self) {
466466
if let Some(dup) = self.pending_dups.last()
467467
&& dup.span != self.prev().span
468468
{
@@ -502,7 +502,7 @@ impl<'a> CoverageSpansGenerator<'a> {
502502
// by `self.curr_mut().merge_from(prev)`.
503503
self.curr_original_span = curr.span;
504504
self.some_curr.replace(curr);
505-
self.check_pending_dups();
505+
self.maybe_flush_pending_dups();
506506
return true;
507507
}
508508
}

0 commit comments

Comments
 (0)