summary refs log tree commit diff
path: root/src/liballoc/rc.rs
diff options
context:
space:
mode:
authorRicho Healey <richo@psych0tik.net>2015-04-07 00:40:22 -0700
committerRicho Healey <richo@psych0tik.net>2015-04-07 22:50:36 -0700
commita329a61b9bf01bfc3f9f7316bb800b2bc8b76382 (patch)
tree2c46d4e549d500b30787bfd9d16481f6cbef1849 /src/liballoc/rc.rs
parentb2e65ee6e4e1523b1d4c56ea0ec430e28946f2f4 (diff)
downloadrust-a329a61b9bf01bfc3f9f7316bb800b2bc8b76382.tar.gz
rust-a329a61b9bf01bfc3f9f7316bb800b2bc8b76382.zip
alloc: impl fmt::Pointer for Rc, Arc and Box
Closes #24091
Diffstat (limited to 'src/liballoc/rc.rs')
-rw-r--r--src/liballoc/rc.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs
index 56822cfe28a..67805d10a4a 100644
--- a/src/liballoc/rc.rs
+++ b/src/liballoc/rc.rs
@@ -634,6 +634,13 @@ impl<T: fmt::Debug> fmt::Debug for Rc<T> {
     }
 }
 
+#[stable(feature = "rust1", since = "1.0.0")]
+impl<T> fmt::Pointer for Rc<T> {
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        fmt::Pointer::fmt(&*self._ptr, f)
+    }
+}
+
 /// A weak version of `Rc<T>`.
 ///
 /// Weak references do not count when determining if the inner value should be