In rustc_mir_tranform
, iterate over index newtypes instead of ints
This commit is contained in:
parent
69b3959afe
commit
c36e8fcc3c
6 changed files with 46 additions and 53 deletions
|
@ -257,6 +257,13 @@ impl Parse for Newtype {
|
|||
}
|
||||
}
|
||||
|
||||
impl std::ops::AddAssign<usize> for #name {
|
||||
#[inline]
|
||||
fn add_assign(&mut self, other: usize) {
|
||||
*self = *self + other;
|
||||
}
|
||||
}
|
||||
|
||||
impl rustc_index::Idx for #name {
|
||||
#[inline]
|
||||
fn new(value: usize) -> Self {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue