File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -4771,16 +4771,24 @@ pub struct ParseIntError {
4771
4771
pub kind : IntErrorKind ,
4772
4772
}
4773
4773
4774
+ /// Enum to store the various types of errors that can cause parsing an integer to fail.
4774
4775
#[ unstable( feature = "int_error_matching" ,
4775
4776
reason = "it can be useful to match errors when making error messages \
4776
4777
for integer parsing",
4777
4778
issue = "22639" ) ]
4778
4779
#[ derive( Debug , Clone , PartialEq , Eq ) ]
4779
4780
#[ non_exhaustive]
4780
4781
pub enum IntErrorKind {
4782
+ /// Value being parsed is empty.
4783
+ /// Among other causes, this variant will be constructed when parsing an empty string.
4781
4784
Empty ,
4785
+ /// Contains an invalid digit.
4786
+ /// Among other causes, this variant will be constructed when parsing a string that
4787
+ /// contains a letter.
4782
4788
InvalidDigit ,
4789
+ /// Integer is too small to store in target integer type.
4783
4790
Overflow ,
4791
+ /// Integer is too large to store in target integer type.
4784
4792
Underflow ,
4785
4793
}
4786
4794
You can’t perform that action at this time.
0 commit comments