@@ -95,7 +95,10 @@ pub enum IntErrorKind {
9595 /// Contains an digit invalid in its context.
9696 ///
9797 /// Among other causes, this variant will be constructed when parsing a string that
98- /// contains a letter.
98+ /// contains a non-asci char.
99+ ///
100+ /// This variant is also constructed when a `+` or `-` is misplaced within a sting
101+ /// either on its own or in the middle of a number.
99102 #[ stable( feature = "int_error_matching" , since = "1.47.0" ) ]
100103 InvalidDigit ( #[ stable( feature = "int_error_matching" , since = "1.47.0" ) ] char ) ,
101104 /// Integer is too large to store in target integer type.
@@ -110,9 +113,6 @@ pub enum IntErrorKind {
110113 /// would be illegal for non-zero types.
111114 #[ stable( feature = "int_error_matching" , since = "1.47.0" ) ]
112115 Zero ,
113- /// The value contains nothing other than sign `+` or `-`.
114- #[ stable( feature = "int_error_matching" , since = "1.47.0" ) ]
115- OnlySign ,
116116}
117117
118118impl ParseIntError {
@@ -135,7 +135,6 @@ impl ParseIntError {
135135 IntErrorKind :: PosOverflow => "number too large to fit in target type" ,
136136 IntErrorKind :: NegOverflow => "number too small to fit in target type" ,
137137 IntErrorKind :: Zero => "number would be zero for non-zero type" ,
138- IntErrorKind :: OnlySign => "only sign without digits found in string" ,
139138 }
140139 }
141140}
0 commit comments