about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src/coverage/mappings.rs
diff options
context:
space:
mode:
authorZalathar <Zalathar@users.noreply.github.com>2024-05-02 14:39:24 +1000
committerZalathar <Zalathar@users.noreply.github.com>2024-05-04 11:26:05 +1000
commit6968123c3f960da2ec75b049e8a6497eaca67a2b (patch)
tree032d43f0f0b0e4039f7a1d3f071f2e2a4783b574 /compiler/rustc_mir_transform/src/coverage/mappings.rs
parent76d8d01604282316110377162c941499a931d7bf (diff)
downloadrust-6968123c3f960da2ec75b049e8a6497eaca67a2b.tar.gz
rust-6968123c3f960da2ec75b049e8a6497eaca67a2b.zip
coverage: Rename `BcbBranchPair` to `mappings::BranchPair`
This makes it consistent with the other mapping structs introduced by this PR.
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/mappings.rs')
-rw-r--r--compiler/rustc_mir_transform/src/coverage/mappings.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_mir_transform/src/coverage/mappings.rs b/compiler/rustc_mir_transform/src/coverage/mappings.rs
index a8eac9985e0..ddbe1333c4b 100644
--- a/compiler/rustc_mir_transform/src/coverage/mappings.rs
+++ b/compiler/rustc_mir_transform/src/coverage/mappings.rs
@@ -24,7 +24,7 @@ pub(super) struct CodeMapping {
 /// that will be needed for improved branch coverage in the future.
 /// (See <https://github.com/rust-lang/rust/pull/124217>.)
 #[derive(Debug)]
-pub(super) struct BcbBranchPair {
+pub(super) struct BranchPair {
     pub(super) span: Span,
     pub(super) true_bcb: BasicCoverageBlock,
     pub(super) false_bcb: BasicCoverageBlock,
@@ -55,7 +55,7 @@ pub(super) struct MCDCDecision {
 pub(super) struct CoverageSpans {
     bcb_has_mappings: BitSet<BasicCoverageBlock>,
     pub(super) code_mappings: Vec<CodeMapping>,
-    pub(super) branch_pairs: Vec<BcbBranchPair>,
+    pub(super) branch_pairs: Vec<BranchPair>,
     test_vector_bitmap_bytes: u32,
     pub(super) mcdc_branches: Vec<MCDCBranch>,
     pub(super) mcdc_decisions: Vec<MCDCDecision>,
@@ -124,7 +124,7 @@ pub(super) fn generate_coverage_spans(
     for &CodeMapping { span: _, bcb } in &code_mappings {
         insert(bcb);
     }
-    for &BcbBranchPair { true_bcb, false_bcb, .. } in &branch_pairs {
+    for &BranchPair { true_bcb, false_bcb, .. } in &branch_pairs {
         insert(true_bcb);
         insert(false_bcb);
     }
@@ -183,7 +183,7 @@ pub(super) fn extract_branch_pairs(
     mir_body: &mir::Body<'_>,
     hir_info: &ExtractedHirInfo,
     basic_coverage_blocks: &CoverageGraph,
-) -> Vec<BcbBranchPair> {
+) -> Vec<BranchPair> {
     let Some(branch_info) = mir_body.coverage_branch_info.as_deref() else { return vec![] };
 
     let block_markers = resolve_block_markers(branch_info, mir_body);
@@ -206,7 +206,7 @@ pub(super) fn extract_branch_pairs(
             let true_bcb = bcb_from_marker(true_marker)?;
             let false_bcb = bcb_from_marker(false_marker)?;
 
-            Some(BcbBranchPair { span, true_bcb, false_bcb })
+            Some(BranchPair { span, true_bcb, false_bcb })
         })
         .collect::<Vec<_>>()
 }