Skip to content

Commit 2a3e17c

Browse files
committed
coverage: Remove unnecessary bcb_successors
Given that we directly access the graph predecessors/successors in so many other places, and sometimes must do so to satisfy the borrow checker, there is little value in having this trivial helper method.
1 parent 669327f commit 2a3e17c

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

Diff for: compiler/rustc_mir_transform/src/coverage/counters.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,7 @@ impl<'a> MakeBcbCounters<'a> {
323323
}
324324

325325
// Determine the set of out-edges that don't yet have edge counters.
326-
let candidate_successors = self
327-
.bcb_successors(from_bcb)
326+
let candidate_successors = self.basic_coverage_blocks.successors[from_bcb]
328327
.iter()
329328
.copied()
330329
.filter(|&to_bcb| self.edge_has_no_counter(from_bcb, to_bcb))
@@ -502,11 +501,6 @@ impl<'a> MakeBcbCounters<'a> {
502501
None
503502
}
504503

505-
#[inline]
506-
fn bcb_successors(&self, bcb: BasicCoverageBlock) -> &[BasicCoverageBlock] {
507-
&self.basic_coverage_blocks.successors[bcb]
508-
}
509-
510504
#[inline]
511505
fn edge_has_no_counter(
512506
&self,

0 commit comments

Comments
 (0)