diff options
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/arc.rs | 7 | ||||
| -rw-r--r-- | src/liballoc/boxed.rs | 1 | ||||
| -rw-r--r-- | src/liballoc/rc.rs | 7 |
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. |
