Skip to content

Commit 667eda8

Browse files
committed
coverage: Rename parameter branching_bcb to from_bcb
1 parent 0f44eb3 commit 667eda8

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

compiler/rustc_mir_transform/src/coverage/counters.rs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -248,13 +248,12 @@ impl<'a> MakeBcbCounters<'a> {
248248
fn make_branch_counters(
249249
&mut self,
250250
traversal: &TraverseCoverageGraphWithLoops<'_>,
251-
branching_bcb: BasicCoverageBlock,
251+
from_bcb: BasicCoverageBlock,
252252
branching_counter_operand: CovTerm,
253253
) {
254-
let branches = self.bcb_branches(branching_bcb);
254+
let branches = self.bcb_branches(from_bcb);
255255
debug!(
256-
"{:?} has some branch(es) without counters:\n {}",
257-
branching_bcb,
256+
"{from_bcb:?} has some branch(es) without counters:\n {}",
258257
branches
259258
.iter()
260259
.map(|branch| { format!("{:?}: {:?}", branch, self.branch_counter(branch)) })
@@ -279,14 +278,13 @@ impl<'a> MakeBcbCounters<'a> {
279278
if branch != expression_branch {
280279
let branch_counter_operand = if branch.is_only_path_to_target() {
281280
debug!(
282-
" {:?} has only one incoming edge (from {:?}), so adding a \
283-
counter",
284-
branch, branching_bcb
281+
" {branch:?} has only one incoming edge (from {from_bcb:?}), \
282+
so adding a counter",
285283
);
286284
self.get_or_make_counter_operand(branch.target_bcb)
287285
} else {
288286
debug!(" {:?} has multiple incoming edges, so adding an edge counter", branch);
289-
self.get_or_make_edge_counter_operand(branching_bcb, branch.target_bcb)
287+
self.get_or_make_edge_counter_operand(from_bcb, branch.target_bcb)
290288
};
291289
if let Some(sumup_counter_operand) =
292290
some_sumup_counter_operand.replace(branch_counter_operand)
@@ -323,7 +321,7 @@ impl<'a> MakeBcbCounters<'a> {
323321
if expression_branch.is_only_path_to_target() {
324322
self.coverage_counters.set_bcb_counter(bcb, expression);
325323
} else {
326-
self.coverage_counters.set_bcb_edge_counter(branching_bcb, bcb, expression);
324+
self.coverage_counters.set_bcb_edge_counter(from_bcb, bcb, expression);
327325
}
328326
}
329327

0 commit comments

Comments
 (0)