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] diff --git a/testing/src/gdt.rs b/testing/src/gdt.rs index d273631c1..14fc74023 100644 --- a/testing/src/gdt.rs +++ b/testing/src/gdt.rs @@ -13,7 +13,7 @@ lazy_static! { static mut STACK: [u8; STACK_SIZE] = [0; STACK_SIZE]; let stack_start = VirtAddr::from_ptr(unsafe { &STACK }); - let stack_end = stack_start + STACK_SIZE; + let stack_end = stack_start + STACK_SIZE as u64; stack_end }; tss