Impl Pointer for VirtAddr and PhysAddr
@@ -236,6 +236,13 @@ impl fmt::UpperHex for VirtAddr {
}
}
+impl fmt::Pointer for VirtAddr {
+ #[inline]
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fmt::Pointer::fmt(&(self.0 as *const ()), f)
+ }
+}
+
impl Add<u64> for VirtAddr {
type Output = Self;
#[inline]
@@ -443,6 +450,13 @@ impl fmt::UpperHex for PhysAddr {
}
}
+impl fmt::Pointer for PhysAddr {
+ #[inline]
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fmt::Pointer::fmt(&(self.0 as *const ()), f)
+ }
+}
+
impl Add<u64> for PhysAddr {
type Output = Self;
#[inline]
