Skip to content

Commit

Permalink
Rollup merge of rust-lang#135680 - Zalathar:counters-cleanup, r=compi…
Browse files Browse the repository at this point in the history
…ler-errors

coverage: Clean up a few things after the counters overhaul

Follow-up to rust-lang#135481. No functional change; this is mostly just deleting or moving code.
  • Loading branch information
matthiaskrgr authored Jan 18, 2025
2 parents 9d99f9c + ea0c86c commit 41ea084
Show file tree
Hide file tree
Showing 3 changed files with 136 additions and 197 deletions.
8 changes: 2 additions & 6 deletions compiler/rustc_middle/src/mir/coverage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Loading

0 comments on commit 41ea084

Please sign in to comment.