diff --git a/src/addr.rs b/src/addr.rs index 09ec65328..46852c081 100644 --- a/src/addr.rs +++ b/src/addr.rs @@ -281,23 +281,6 @@ impl AddAssign for VirtAddr { } } -#[cfg(target_pointer_width = "64")] -impl Add for VirtAddr { - type Output = Self; - #[inline] - fn add(self, rhs: usize) -> Self::Output { - self + rhs as u64 - } -} - -#[cfg(target_pointer_width = "64")] -impl AddAssign for VirtAddr { - #[inline] - fn add_assign(&mut self, rhs: usize) { - self.add_assign(rhs as u64) - } -} - impl Sub for VirtAddr { type Output = Self; #[inline] @@ -313,23 +296,6 @@ impl SubAssign for VirtAddr { } } -#[cfg(target_pointer_width = "64")] -impl Sub for VirtAddr { - type Output = Self; - #[inline] - fn sub(self, rhs: usize) -> Self::Output { - self - rhs as u64 - } -} - -#[cfg(target_pointer_width = "64")] -impl SubAssign for VirtAddr { - #[inline] - fn sub_assign(&mut self, rhs: usize) { - self.sub_assign(rhs as u64) - } -} - impl Sub for VirtAddr { type Output = u64; #[inline] @@ -564,23 +530,6 @@ impl AddAssign for PhysAddr { } } -#[cfg(target_pointer_width = "64")] -impl Add for PhysAddr { - type Output = Self; - #[inline] - fn add(self, rhs: usize) -> Self::Output { - self + rhs as u64 - } -} - -#[cfg(target_pointer_width = "64")] -impl AddAssign for PhysAddr { - #[inline] - fn add_assign(&mut self, rhs: usize) { - self.add_assign(rhs as u64) - } -} - impl Sub for PhysAddr { type Output = Self; #[inline] @@ -596,23 +545,6 @@ impl SubAssign for PhysAddr { } } -#[cfg(target_pointer_width = "64")] -impl Sub for PhysAddr { - type Output = Self; - #[inline] - fn sub(self, rhs: usize) -> Self::Output { - self - rhs as u64 - } -} - -#[cfg(target_pointer_width = "64")] -impl SubAssign for PhysAddr { - #[inline] - fn sub_assign(&mut self, rhs: usize) { - self.sub_assign(rhs as u64) - } -} - impl Sub for PhysAddr { type Output = u64; #[inline]