diff options
| author | Zalathar <Zalathar@users.noreply.github.com> | 2023-10-16 20:53:41 +1100 |
|---|---|---|
| committer | Zalathar <Zalathar@users.noreply.github.com> | 2023-10-16 20:53:41 +1100 |
| commit | 9b6ce4fb3c86b9b1eadf6cef537d17138ec56d1e (patch) | |
| tree | ae997d06147d87accc5ef5c728c2777e4c1960b4 | |
| parent | 46c545c1ba7a859825b4760cbf6360f4d0a8e3de (diff) | |
| download | rust-9b6ce4fb3c86b9b1eadf6cef537d17138ec56d1e.tar.gz rust-9b6ce4fb3c86b9b1eadf6cef537d17138ec56d1e.zip | |
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.
| -rw-r--r-- | compiler/rustc_mir_transform/src/coverage/spans.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_mir_transform/src/coverage/spans.rs b/compiler/rustc_mir_transform/src/coverage/spans.rs index 2c5aeeee841..f9b7e74b0b5 100644 --- a/compiler/rustc_mir_transform/src/coverage/spans.rs +++ b/compiler/rustc_mir_transform/src/coverage/spans.rs @@ -462,7 +462,7 @@ impl<'a> CoverageSpansGenerator<'a> { /// `pending_dups` could have as few as one span) /// In either case, no more spans will match the span of `pending_dups`, so /// add the `pending_dups` if they don't overlap `curr`, and clear the list. - fn check_pending_dups(&mut self) { + fn maybe_flush_pending_dups(&mut self) { if let Some(dup) = self.pending_dups.last() && dup.span != self.prev().span { @@ -502,7 +502,7 @@ impl<'a> CoverageSpansGenerator<'a> { // by `self.curr_mut().merge_from(prev)`. self.curr_original_span = curr.span; self.some_curr.replace(curr); - self.check_pending_dups(); + self.maybe_flush_pending_dups(); return true; } } |
