@@ -219,6 +219,7 @@ impl<'a> Show for Arguments<'a> {
219219 }
220220}
221221
222+ #[ stable]
222223impl < ' a > String for Arguments < ' a > {
223224 fn fmt ( & self , fmt : & mut Formatter ) -> Result {
224225 write ( fmt. buf , * self )
@@ -627,6 +628,7 @@ impl Show for bool {
627628 }
628629}
629630
631+ #[ stable]
630632impl String for bool {
631633 fn fmt ( & self , f : & mut Formatter ) -> Result {
632634 String :: fmt ( if * self { "true" } else { "false" } , f)
@@ -643,6 +645,7 @@ impl Show for str {
643645 }
644646}
645647
648+ #[ stable]
646649impl String for str {
647650 fn fmt ( & self , f : & mut Formatter ) -> Result {
648651 f. pad ( self )
@@ -660,6 +663,7 @@ impl Show for char {
660663 }
661664}
662665
666+ #[ stable]
663667impl String for char {
664668 fn fmt ( & self , f : & mut Formatter ) -> Result {
665669 let mut utf8 = [ 0u8 ; 4 ] ;
@@ -705,6 +709,7 @@ macro_rules! floating { ($ty:ident) => {
705709 }
706710 }
707711
712+ #[ stable]
708713 impl String for $ty {
709714 fn fmt( & self , fmt: & mut Formatter ) -> Result {
710715 use num:: Float ;
@@ -776,15 +781,9 @@ floating! { f64 }
776781impl < T > Show for * const T {
777782 fn fmt ( & self , f : & mut Formatter ) -> Result { Pointer :: fmt ( self , f) }
778783}
779- impl < T > String for * const T {
780- fn fmt ( & self , f : & mut Formatter ) -> Result { Pointer :: fmt ( self , f) }
781- }
782784impl < T > Show for * mut T {
783785 fn fmt ( & self , f : & mut Formatter ) -> Result { Pointer :: fmt ( self , f) }
784786}
785- impl < T > String for * mut T {
786- fn fmt ( & self , f : & mut Formatter ) -> Result { Pointer :: fmt ( self , f) }
787- }
788787
789788macro_rules! peel {
790789 ( $name: ident, $( $other: ident, ) * ) => ( tuple! { $( $other, ) * } )
@@ -843,39 +842,12 @@ impl<T: Show> Show for [T] {
843842 }
844843}
845844
846- impl < T : String > String for [ T ] {
847- fn fmt ( & self , f : & mut Formatter ) -> Result {
848- if f. flags & ( 1 << ( rt:: FlagAlternate as uint ) ) == 0 {
849- try!( write ! ( f, "[" ) ) ;
850- }
851- let mut is_first = true ;
852- for x in self . iter ( ) {
853- if is_first {
854- is_first = false ;
855- } else {
856- try!( write ! ( f, ", " ) ) ;
857- }
858- try!( write ! ( f, "{}" , * x) )
859- }
860- if f. flags & ( 1 << ( rt:: FlagAlternate as uint ) ) == 0 {
861- try!( write ! ( f, "]" ) ) ;
862- }
863- Ok ( ( ) )
864- }
865- }
866-
867845impl Show for ( ) {
868846 fn fmt ( & self , f : & mut Formatter ) -> Result {
869847 f. pad ( "()" )
870848 }
871849}
872850
873- impl String for ( ) {
874- fn fmt ( & self , f : & mut Formatter ) -> Result {
875- f. pad ( "()" )
876- }
877- }
878-
879851impl < T : Copy + Show > Show for Cell < T > {
880852 fn fmt ( & self , f : & mut Formatter ) -> Result {
881853 write ! ( f, "Cell {{ value: {:?} }}" , self . get( ) )
@@ -904,6 +876,7 @@ impl<'b, T: Show> Show for RefMut<'b, T> {
904876 }
905877}
906878
879+ #[ stable]
907880impl String for Utf8Error {
908881 fn fmt ( & self , f : & mut Formatter ) -> Result {
909882 match * self {
0 commit comments