Skip to content

Commit ce42076

Browse files
committed
mark is_val_statically_known intrinsic as stably const-callable
1 parent a8e1186 commit ce42076

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

library/core/src/intrinsics.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -2865,7 +2865,11 @@ where
28652865
/// # _ = foo(&5_i32);
28662866
/// # _ = bar(&5_i32);
28672867
/// ```
2868-
#[rustc_const_unstable(feature = "is_val_statically_known", issue = "none")]
2868+
#[cfg_attr(
2869+
bootstrap,
2870+
rustc_const_stable(feature = "const_is_val_statically_known", since = "CURRENT_RUSTC_VERSION")
2871+
)]
2872+
#[cfg_attr(not(bootstrap), rustc_const_stable_indirect)]
28692873
#[rustc_nounwind]
28702874
#[unstable(feature = "core_intrinsics", issue = "none")]
28712875
#[rustc_intrinsic]

library/core/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@
149149
#![feature(internal_impls_macro)]
150150
#![feature(ip)]
151151
#![feature(is_ascii_octdigit)]
152-
#![feature(is_val_statically_known)]
153152
#![feature(lazy_get)]
154153
#![feature(link_cfg)]
155154
#![feature(non_null_from_ref)]

library/core/src/num/int_macros.rs

-2
Original file line numberDiff line numberDiff line change
@@ -2260,7 +2260,6 @@ macro_rules! int_impl {
22602260
#[must_use = "this returns the result of the operation, \
22612261
without modifying the original"]
22622262
#[inline]
2263-
#[rustc_allow_const_fn_unstable(is_val_statically_known)]
22642263
pub const fn wrapping_pow(self, mut exp: u32) -> Self {
22652264
if exp == 0 {
22662265
return 1;
@@ -2828,7 +2827,6 @@ macro_rules! int_impl {
28282827
without modifying the original"]
28292828
#[inline]
28302829
#[rustc_inherit_overflow_checks]
2831-
#[rustc_allow_const_fn_unstable(is_val_statically_known)]
28322830
pub const fn pow(self, mut exp: u32) -> Self {
28332831
if exp == 0 {
28342832
return 1;

library/core/src/num/uint_macros.rs

-2
Original file line numberDiff line numberDiff line change
@@ -2190,7 +2190,6 @@ macro_rules! uint_impl {
21902190
#[must_use = "this returns the result of the operation, \
21912191
without modifying the original"]
21922192
#[inline]
2193-
#[rustc_allow_const_fn_unstable(is_val_statically_known)]
21942193
pub const fn wrapping_pow(self, mut exp: u32) -> Self {
21952194
if exp == 0 {
21962195
return 1;
@@ -2706,7 +2705,6 @@ macro_rules! uint_impl {
27062705
without modifying the original"]
27072706
#[inline]
27082707
#[rustc_inherit_overflow_checks]
2709-
#[rustc_allow_const_fn_unstable(is_val_statically_known)]
27102708
pub const fn pow(self, mut exp: u32) -> Self {
27112709
if exp == 0 {
27122710
return 1;

0 commit comments

Comments
 (0)