Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

coverage: Several small cleanups in spans #116754

Merged
merged 14 commits into from
Oct 17, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
coverage: Rename hold_pending_dups_unless_dominated to `update_pend…
…ing_dups`
  • Loading branch information
Zalathar committed Oct 16, 2023
commit d928d3e5d85c850ed2fe07dbeb00b3130ecfe6a5
4 changes: 2 additions & 2 deletions compiler/rustc_mir_transform/src/coverage/spans.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ impl<'a> CoverageSpansGenerator<'a> {
);
self.take_curr();
} else {
self.hold_pending_dups_unless_dominated();
self.update_pending_dups();
}
} else {
self.cutoff_prev_at_overlapping_curr();
Expand Down Expand Up @@ -585,7 +585,7 @@ impl<'a> CoverageSpansGenerator<'a> {
/// neither `CoverageSpan` dominates the other, both (or possibly more than two) are held,
/// until their disposition is determined. In this latter case, the `prev` dup is moved into
/// `pending_dups` so the new `curr` dup can be moved to `prev` for the next iteration.
fn hold_pending_dups_unless_dominated(&mut self) {
fn update_pending_dups(&mut self) {
// Equal coverage spans are ordered by dominators before dominated (if any), so it should be
// impossible for `curr` to dominate any previous `CoverageSpan`.
debug_assert!(!self.span_bcb_dominates(self.curr(), self.prev()));
Expand Down