Skip to content

Commit 6b549ba

Browse files
committed
mark can_not_overflow as #[rustc_const_stable(...)]
see rust-lang#124941 (comment)
1 parent 259c058 commit 6b549ba

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

core/src/num/mod.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1387,7 +1387,7 @@ from_str_radix_int_impl! { isize i8 i16 i32 i64 i128 usize u8 u16 u32 u64 u128 }
13871387
#[doc(hidden)]
13881388
#[inline(always)]
13891389
#[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")]
13911391
pub const fn can_not_overflow<T>(radix: u32, is_signed_ty: bool, digits: &[u8]) -> bool {
13921392
radix <= 16 && digits.len() <= mem::size_of::<T>() * 2 - is_signed_ty as usize
13931393
}
@@ -1411,7 +1411,6 @@ const fn from_str_radix_panic(radix: u32) {
14111411
intrinsics::const_eval_select((radix,), from_str_radix_panic_ct, from_str_radix_panic_rt);
14121412
}
14131413

1414-
#[allow_internal_unstable(const_int_cannot_overflow)]
14151414
macro_rules! from_str_radix {
14161415
($($int_ty:ty)+) => {$(
14171416
impl $int_ty {

0 commit comments

Comments
 (0)