coverage: Remove next_id methods from counter/expression IDs

When these methods were originally written, I wasn't aware that
`newtype_index!` already supports addition with ordinary numbers, without
needing to unwrap and re-wrap.
This commit is contained in:
Zalathar 2023-09-06 17:53:04 +10:00
parent b1cf0c8f1b
commit 053c4f94a0
2 changed files with 2 additions and 12 deletions

View file

@ -18,11 +18,6 @@ rustc_index::newtype_index! {
impl CounterId {
pub const START: Self = Self::from_u32(0);
#[inline(always)]
pub fn next_id(self) -> Self {
Self::from_u32(self.as_u32() + 1)
}
}
rustc_index::newtype_index! {
@ -38,11 +33,6 @@ rustc_index::newtype_index! {
impl ExpressionId {
pub const START: Self = Self::from_u32(0);
#[inline(always)]
pub fn next_id(self) -> Self {
Self::from_u32(self.as_u32() + 1)
}
}
/// Operand of a coverage-counter expression.