diff options
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/arc.rs | 2 | ||||
| -rw-r--r-- | src/liballoc/rc.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs index 9481cd4e1a4..fc0a3c0fd88 100644 --- a/src/liballoc/arc.rs +++ b/src/liballoc/arc.rs @@ -1328,7 +1328,7 @@ impl<T: ?Sized + fmt::Debug> fmt::Debug for Arc<T> { #[stable(feature = "rust1", since = "1.0.0")] impl<T: ?Sized> fmt::Pointer for Arc<T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - fmt::Pointer::fmt(&self.ptr, f) + fmt::Pointer::fmt(&(&**self as *const T), f) } } diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs index 2f8620cc750..72b9fa0eb47 100644 --- a/src/liballoc/rc.rs +++ b/src/liballoc/rc.rs @@ -1072,7 +1072,7 @@ impl<T: ?Sized + fmt::Debug> fmt::Debug for Rc<T> { #[stable(feature = "rust1", since = "1.0.0")] impl<T: ?Sized> fmt::Pointer for Rc<T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - fmt::Pointer::fmt(&self.ptr, f) + fmt::Pointer::fmt(&(&**self as *const T), f) } } |
