Rollup merge of #124941 - Skgland:stabilize-const-int-from-str, r=dto… · model-checking/verify-rust-std@a2dbfd3
@@ -1386,6 +1386,7 @@ from_str_radix_int_impl! { isize i8 i16 i32 i64 i128 usize u8 u16 u32 u64 u128 }
13861386#[doc(hidden)]
13871387#[inline(always)]
13881388#[unstable(issue = "none", feature = "std_internals")]
1389+#[rustc_const_stable(feature = "const_int_from_str", since = "CURRENT_RUSTC_VERSION")]
13891390pub const fn can_not_overflow<T>(radix: u32, is_signed_ty: bool, digits: &[u8]) -> bool {
13901391 radix <= 16 && digits.len() <= mem::size_of::<T>() * 2 - is_signed_ty as usize
13911392}
@@ -1435,7 +1436,7 @@ macro_rules! from_str_radix {
14351436 #[doc = concat!("assert_eq!(", stringify!($int_ty), "::from_str_radix(\"A\", 16), Ok(10));")]
14361437/// ```
14371438 #[stable(feature = "rust1", since = "1.0.0")]
1438- #[rustc_const_unstable(feature = "const_int_from_str", issue = "59133")]
1439+ #[rustc_const_stable(feature = "const_int_from_str", since = "CURRENT_RUSTC_VERSION")]
14391440pub const fn from_str_radix(src: &str, radix: u32) -> Result<$int_ty, ParseIntError> {
14401441use self::IntErrorKind::*;
14411442use self::ParseIntError as PIE;
@@ -1565,7 +1566,7 @@ macro_rules! from_str_radix_size_impl {
15651566 #[doc = concat!("assert_eq!(", stringify!($size), "::from_str_radix(\"A\", 16), Ok(10));")]
15661567/// ```
15671568 #[stable(feature = "rust1", since = "1.0.0")]
1568- #[rustc_const_unstable(feature = "const_int_from_str", issue = "59133")]
1569+ #[rustc_const_stable(feature = "const_int_from_str", since = "CURRENT_RUSTC_VERSION")]
15691570pub const fn from_str_radix(src: &str, radix: u32) -> Result<$size, ParseIntError> {
15701571match <$t>::from_str_radix(src, radix) {
15711572Ok(x) => Ok(x as $size),