diff --git a/compiler/rustc_middle/src/lib.rs b/compiler/rustc_middle/src/lib.rs index a675aae5b17d4..c11e259b4dfe4 100644 --- a/compiler/rustc_middle/src/lib.rs +++ b/compiler/rustc_middle/src/lib.rs @@ -50,7 +50,6 @@ #![feature(associated_type_bounds)] #![feature(rustc_attrs)] #![feature(hash_raw_entry)] -#![feature(int_error_matching)] #![recursion_limit = "512"] #[macro_use] diff --git a/library/core/src/num/mod.rs b/library/core/src/num/mod.rs index 757ad5252bab3..20e296b73fe8c 100644 --- a/library/core/src/num/mod.rs +++ b/library/core/src/num/mod.rs @@ -5293,43 +5293,38 @@ pub struct ParseIntError { } /// Enum to store the various types of errors that can cause parsing an integer to fail. -#[unstable( - feature = "int_error_matching", - reason = "it can be useful to match errors when making error messages \ - for integer parsing", - issue = "22639" -)] +#[stable(feature = "int_error_matching", since = "1.47.0")] #[derive(Debug, Clone, PartialEq, Eq)] #[non_exhaustive] pub enum IntErrorKind { /// Value being parsed is empty. /// /// Among other causes, this variant will be constructed when parsing an empty string. + #[stable(feature = "int_error_matching", since = "1.47.0")] Empty, /// Contains an invalid digit. /// /// Among other causes, this variant will be constructed when parsing a string that /// contains a letter. + #[stable(feature = "int_error_matching", since = "1.47.0")] InvalidDigit, /// Integer is too large to store in target integer type. + #[stable(feature = "int_error_matching", since = "1.47.0")] Overflow, /// Integer is too small to store in target integer type. + #[stable(feature = "int_error_matching", since = "1.47.0")] Underflow, /// Value was Zero /// /// This variant will be emitted when the parsing string has a value of zero, which /// would be illegal for non-zero types. + #[stable(feature = "int_error_matching", since = "1.47.0")] Zero, } impl ParseIntError { /// Outputs the detailed cause of parsing an integer failing. - #[unstable( - feature = "int_error_matching", - reason = "it can be useful to match errors when making error messages \ - for integer parsing", - issue = "22639" - )] + #[stable(feature = "int_error_matching", since = "1.47.0")] pub fn kind(&self) -> &IntErrorKind { &self.kind } diff --git a/library/core/tests/lib.rs b/library/core/tests/lib.rs index 4a651e5aa0ee3..3ed539413f38b 100644 --- a/library/core/tests/lib.rs +++ b/library/core/tests/lib.rs @@ -30,7 +30,6 @@ #![feature(try_trait)] #![feature(slice_internals)] #![feature(slice_partition_dedup)] -#![feature(int_error_matching)] #![feature(array_value_iter)] #![feature(iter_partition_in_place)] #![feature(iter_is_partitioned)] diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs index dc57c1c1f44db..40456096738a0 100644 --- a/library/std/src/lib.rs +++ b/library/std/src/lib.rs @@ -265,7 +265,6 @@ #![feature(hash_raw_entry)] #![feature(hashmap_internals)] #![feature(int_error_internals)] -#![feature(int_error_matching)] #![feature(integer_atomics)] #![feature(into_future)] #![feature(lang_items)] diff --git a/library/std/src/num.rs b/library/std/src/num.rs index 0f1c596268594..ac3b055cdb050 100644 --- a/library/std/src/num.rs +++ b/library/std/src/num.rs @@ -22,12 +22,7 @@ pub use core::num::{NonZeroI128, NonZeroI16, NonZeroI32, NonZeroI64, NonZeroI8, #[stable(feature = "nonzero", since = "1.28.0")] pub use core::num::{NonZeroU128, NonZeroU16, NonZeroU32, NonZeroU64, NonZeroU8, NonZeroUsize}; -#[unstable( - feature = "int_error_matching", - reason = "it can be useful to match errors when making error messages \ - for integer parsing", - issue = "22639" -)] +#[stable(feature = "int_error_matching", since = "1.47.0")] pub use core::num::IntErrorKind; #[cfg(test)]