diff options
Diffstat (limited to 'src/libcore/borrow.rs')
| -rw-r--r-- | src/libcore/borrow.rs | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/libcore/borrow.rs b/src/libcore/borrow.rs index 31631355422..4363a0a4441 100644 --- a/src/libcore/borrow.rs +++ b/src/libcore/borrow.rs @@ -133,7 +133,7 @@ impl<T> ToOwned<T> for T where T: Clone { /// } /// } /// ``` -//#[deriving(Show)] NOTE(stage0): uncomment after snapshot +#[derive(Show)] pub enum Cow<'a, T, B: ?Sized + 'a> where B: ToOwned<T> { /// Borrowed data. Borrowed(&'a B), @@ -142,16 +142,6 @@ pub enum Cow<'a, T, B: ?Sized + 'a> where B: ToOwned<T> { Owned(T) } -//NOTE(stage0): replace with deriving(Show) after snapshot -impl<'a, T, B: ?Sized> fmt::Show for Cow<'a, T, B> where - B: fmt::String + ToOwned<T>, - T: fmt::String -{ - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - fmt::String::fmt(self, f) - } -} - #[stable] impl<'a, T, B: ?Sized> Clone for Cow<'a, T, B> where B: ToOwned<T> { fn clone(&self) -> Cow<'a, T, B> { @@ -248,6 +238,7 @@ impl<'a, T, B: ?Sized> PartialOrd for Cow<'a, T, B> where B: PartialOrd + ToOwne } } +#[stable] impl<'a, T, B: ?Sized> fmt::String for Cow<'a, T, B> where B: fmt::String + ToOwned<T>, T: fmt::String, |
