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 {
47714771 pub kind : IntErrorKind ,
47724772}
47734773
4774+ /// Enum to store the various types of errors that can cause parsing an integer to fail.
47744775#[ unstable( feature = "int_error_matching" ,
47754776 reason = "it can be useful to match errors when making error messages \
47764777 for integer parsing",
47774778 issue = "22639" ) ]
47784779#[ derive( Debug , Clone , PartialEq , Eq ) ]
47794780#[ non_exhaustive]
47804781pub enum IntErrorKind {
4782+ /// Value being parsed is empty.
4783+ /// Among other causes, this variant will be constructed when parsing an empty string.
47814784 Empty ,
4785+ /// Contains an invalid digit.
4786+ /// Among other causes, this variant will be constructed when parsing a string that
4787+ /// contains a letter.
47824788 InvalidDigit ,
4789+ /// Integer is too small to store in target integer type.
47834790 Overflow ,
4791+ /// Integer is too large to store in target integer type.
47844792 Underflow ,
47854793}
47864794
You can’t perform that action at this time.
0 commit comments