From c6f10f88310d7db2d3b9410ae6c4d2efade58310 Mon Sep 17 00:00:00 2001
From: fort <e@mail.com>
Date: Sun, 1 Jun 2014 23:35:15 -0700
Subject: [PATCH] Adding show impl for Rc

---
 src/liballoc/rc.rs | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs
index 7177aa3de45..416a6ad2d8b 100644
--- a/src/liballoc/rc.rs
+++ b/src/liballoc/rc.rs
@@ -33,6 +33,7 @@ use core::option::{Option, Some, None};
 use core::ptr;
 use core::ptr::RawPtr;
 use core::mem::{min_align_of, size_of};
+use core::fmt;
 
 use heap::deallocate;
 
@@ -178,6 +179,12 @@ impl<T: Ord> Ord for Rc<T> {
     fn cmp(&self, other: &Rc<T>) -> Ordering { (**self).cmp(&**other) }
 }
 
+impl<T: fmt::Show> fmt::Show for Rc<T> {
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        (**self).fmt(f)
+    }
+}
+
 /// Weak reference to a reference-counted box
 #[unsafe_no_drop_flag]
 pub struct Weak<T> {