@@ -20,7 +20,6 @@ use self::wrapping::{OverflowingOps, WrappingOps};
2020use char:: CharExt ;
2121use clone:: Clone ;
2222use cmp:: { PartialEq , Eq , PartialOrd , Ord } ;
23- use error:: Error ;
2423use fmt;
2524use intrinsics;
2625use iter:: Iterator ;
@@ -2948,16 +2947,9 @@ enum IntErrorKind {
29482947 Underflow ,
29492948}
29502949
2951- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
2952- impl fmt:: Display for ParseIntError {
2953- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
2954- self . description ( ) . fmt ( f)
2955- }
2956- }
2957-
2958- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
2959- impl Error for ParseIntError {
2960- fn description ( & self ) -> & str {
2950+ impl ParseIntError {
2951+ #[ unstable( feature = "core" , reason = "available through Error trait" ) ]
2952+ pub fn description ( & self ) -> & str {
29612953 match self . kind {
29622954 IntErrorKind :: Empty => "cannot parse integer from empty string" ,
29632955 IntErrorKind :: InvalidDigit => "invalid digit found in string" ,
@@ -2967,6 +2959,13 @@ impl Error for ParseIntError {
29672959 }
29682960}
29692961
2962+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
2963+ impl fmt:: Display for ParseIntError {
2964+ fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
2965+ self . description ( ) . fmt ( f)
2966+ }
2967+ }
2968+
29702969/// An error which can be returned when parsing a float.
29712970#[ derive( Debug , Clone , PartialEq ) ]
29722971#[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -2978,19 +2977,19 @@ enum FloatErrorKind {
29782977 Invalid ,
29792978}
29802979
2981- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
2982- impl fmt:: Display for ParseFloatError {
2983- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
2984- self . description ( ) . fmt ( f)
2985- }
2986- }
2987-
2988- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
2989- impl Error for ParseFloatError {
2990- fn description ( & self ) -> & str {
2980+ impl ParseFloatError {
2981+ #[ unstable( feature = "core" , reason = "available through Error trait" ) ]
2982+ pub fn description ( & self ) -> & str {
29912983 match self . kind {
29922984 FloatErrorKind :: Empty => "cannot parse float from empty string" ,
29932985 FloatErrorKind :: Invalid => "invalid float literal" ,
29942986 }
29952987 }
29962988}
2989+
2990+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
2991+ impl fmt:: Display for ParseFloatError {
2992+ fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
2993+ self . description ( ) . fmt ( f)
2994+ }
2995+ }
0 commit comments