about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-01-07 17:18:59 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-01-07 17:18:59 -0800
commita204dc56c97f35632575b1baa008f2e069b1bed9 (patch)
treeb55c302f46d0adb457d3ce2f250bc0b1209d0996 /src/liballoc
parenta6bf7676a545f72cef2e3d042b6d0409f295693a (diff)
parent9851b4fbbf327bb1baab3182ce92970d4db22c6c (diff)
downloadrust-a204dc56c97f35632575b1baa008f2e069b1bed9.tar.gz
rust-a204dc56c97f35632575b1baa008f2e069b1bed9.zip
rollup merge of #20722: alexcrichton/audit-show
Conflicts:
	src/libcollections/vec.rs
	src/libcore/fmt/mod.rs
	src/librustdoc/html/format.rs
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/arc.rs7
-rw-r--r--src/liballoc/boxed.rs1
-rw-r--r--src/liballoc/rc.rs7
3 files changed, 15 insertions, 0 deletions
diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs
index 636d80e7451..48136bc1d96 100644
--- a/src/liballoc/arc.rs
+++ b/src/liballoc/arc.rs
@@ -585,6 +585,13 @@ impl<T: fmt::Show> fmt::Show for Arc<T> {
 }
 
 #[stable]
+impl<T: fmt::String> fmt::String for Arc<T> {
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        fmt::String::fmt(&**self, f)
+    }
+}
+
+#[stable]
 impl<T: Default + Sync + Send> Default for Arc<T> {
     #[stable]
     fn default() -> Arc<T> { Arc::new(Default::default()) }
diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs
index 03198caaac4..b42337a8982 100644
--- a/src/liballoc/boxed.rs
+++ b/src/liballoc/boxed.rs
@@ -157,6 +157,7 @@ impl<T: ?Sized + fmt::Show> fmt::Show for Box<T> {
     }
 }
 
+#[stable]
 impl<T: ?Sized + fmt::String> fmt::String for Box<T> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         fmt::String::fmt(&**self, f)
diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs
index 83eff71e2b8..27b3f03002f 100644
--- a/src/liballoc/rc.rs
+++ b/src/liballoc/rc.rs
@@ -622,6 +622,13 @@ impl<T: fmt::Show> fmt::Show for Rc<T> {
     }
 }
 
+#[stable]
+impl<T: fmt::String> fmt::String for Rc<T> {
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        fmt::String::fmt(&**self, f)
+    }
+}
+
 /// A weak version of `Rc<T>`.
 ///
 /// Weak references do not count when determining if the inner value should be dropped.