mark can_not_overflow as #[rustc_const_stable(...)] · model-checking/verify-rust-std@6b549ba (original) (raw)

Original file line number Diff line number Diff line change
@@ -1387,7 +1387,7 @@ from_str_radix_int_impl! { isize i8 i16 i32 i64 i128 usize u8 u16 u32 u64 u128 }
1387 1387 #[doc(hidden)]
1388 1388 #[inline(always)]
1389 1389 #[unstable(issue = "none", feature = "std_internals")]
1390 -#[rustc_const_unstable(issue = "none", feature = "const_int_cannot_overflow")]
1390 +#[rustc_const_stable(feature = "const_int_from_str", since = "CURRENT_RUSTC_VERSION")]
1391 1391 pub const fn can_not_overflow<T>(radix: u32, is_signed_ty: bool, digits: &[u8]) -> bool {
1392 1392 radix <= 16 && digits.len() <= mem::size_of::<T>() * 2 - is_signed_ty as usize
1393 1393 }
@@ -1411,7 +1411,6 @@ const fn from_str_radix_panic(radix: u32) {
1411 1411 intrinsics::const_eval_select((radix,), from_str_radix_panic_ct, from_str_radix_panic_rt);
1412 1412 }
1413 1413
1414 -#[allow_internal_unstable(const_int_cannot_overflow)]
1415 1414 macro_rules! from_str_radix {
1416 1415 ($($int_ty:ty)+) => {$(
1417 1416 impl $int_ty {