about summary refs log tree commit diff
path: root/src/libsyntax/ptr.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/libsyntax/ptr.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/libsyntax/ptr.rs')
-rw-r--r--src/libsyntax/ptr.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libsyntax/ptr.rs b/src/libsyntax/ptr.rs
index 7e0bcd3e1dc..5032cd57eeb 100644
--- a/src/libsyntax/ptr.rs
+++ b/src/libsyntax/ptr.rs
@@ -111,6 +111,13 @@ impl<T: Display> Display for P<T> {
     }
 }
 
+#[stable(feature = "rust1", since = "1.0.0")]
+impl<T> fmt::Pointer for P<T> {
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        fmt::Pointer::fmt(&self.ptr, f)
+    }
+}
+
 impl<T: Hash> Hash for P<T> {
     fn hash<H: Hasher>(&self, state: &mut H) {
         (**self).hash(state);