diff options
| author | Zalathar <Zalathar@users.noreply.github.com> | 2025-01-17 21:34:57 +1100 |
|---|---|---|
| committer | Zalathar <Zalathar@users.noreply.github.com> | 2025-01-18 22:14:16 +1100 |
| commit | 6000d5c462b767e3c5871034824964d0b0897a26 (patch) | |
| tree | 76f94016906b63ae9c2e5f7705d8fe4d318ee028 /compiler/rustc_middle/src/mir/coverage.rs | |
| parent | 4170b93cdc809673a8b837c87a79b387277e010b (diff) | |
| download | rust-6000d5c462b767e3c5871034824964d0b0897a26.tar.gz rust-6000d5c462b767e3c5871034824964d0b0897a26.zip | |
coverage: Remove `BcbCounter` and `BcbExpression`
Making these separate types from `CovTerm` and `Expression` was historically very helpful, but now that most of the counter-creation work is handled by `node_flow` they are no longer needed.
Diffstat (limited to 'compiler/rustc_middle/src/mir/coverage.rs')
| -rw-r--r-- | compiler/rustc_middle/src/mir/coverage.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/compiler/rustc_middle/src/mir/coverage.rs b/compiler/rustc_middle/src/mir/coverage.rs index cd6b2d65bf1..65f51ae9d39 100644 --- a/compiler/rustc_middle/src/mir/coverage.rs +++ b/compiler/rustc_middle/src/mir/coverage.rs @@ -71,11 +71,7 @@ impl ConditionId { /// Enum that can hold a constant zero value, the ID of an physical coverage /// counter, or the ID of a coverage-counter expression. -/// -/// This was originally only used for expression operands (and named `Operand`), -/// but the zero/counter/expression distinction is also useful for representing -/// the value of code/gap mappings, and the true/false arms of branch mappings. -#[derive(Copy, Clone, PartialEq, Eq)] +#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord)] #[derive(TyEncodable, TyDecodable, Hash, HashStable, TypeFoldable, TypeVisitable)] pub enum CovTerm { Zero, @@ -171,7 +167,7 @@ impl Op { } } -#[derive(Clone, Debug)] +#[derive(Clone, Debug, PartialEq, Eq)] #[derive(TyEncodable, TyDecodable, Hash, HashStable, TypeFoldable, TypeVisitable)] pub struct Expression { pub lhs: CovTerm, |
