about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/mir
diff options
context:
space:
mode:
authorZalathar <Zalathar@users.noreply.github.com>2023-07-08 13:43:29 +1000
committerZalathar <Zalathar@users.noreply.github.com>2023-08-20 12:02:40 +1000
commitfbab055e7704a1cd321628a1896333e0c13ebc2f (patch)
tree7057c630b15a715613c8b4af0a62e19dfa14f337 /compiler/rustc_middle/src/mir
parent629437eec78a56b04c4a2dbc6c85278ec1221a26 (diff)
downloadrust-fbab055e7704a1cd321628a1896333e0c13ebc2f.tar.gz
rust-fbab055e7704a1cd321628a1896333e0c13ebc2f.zip
coverage: Give the instrumentor its own counter type, separate from MIR
This splits off `BcbCounter` from MIR's `CoverageKind`, allowing the two types
to evolve in different directions as necessary.
Diffstat (limited to 'compiler/rustc_middle/src/mir')
-rw-r--r--compiler/rustc_middle/src/mir/coverage.rs15
1 files changed, 0 insertions, 15 deletions
diff --git a/compiler/rustc_middle/src/mir/coverage.rs b/compiler/rustc_middle/src/mir/coverage.rs
index d7d6e3a0086..1efb54bdb08 100644
--- a/compiler/rustc_middle/src/mir/coverage.rs
+++ b/compiler/rustc_middle/src/mir/coverage.rs
@@ -96,21 +96,6 @@ pub enum CoverageKind {
     Unreachable,
 }
 
-impl CoverageKind {
-    pub fn as_operand(&self) -> Operand {
-        use CoverageKind::*;
-        match *self {
-            Counter { id, .. } => Operand::Counter(id),
-            Expression { id, .. } => Operand::Expression(id),
-            Unreachable => bug!("Unreachable coverage cannot be part of an expression"),
-        }
-    }
-
-    pub fn is_expression(&self) -> bool {
-        matches!(self, Self::Expression { .. })
-    }
-}
-
 impl Debug for CoverageKind {
     fn fmt(&self, fmt: &mut Formatter<'_>) -> fmt::Result {
         use CoverageKind::*;