Skip to content

Commit 086cfef

Browse files
committed
mark is_val_statically_known intrinsic as stably const-callable
1 parent dffc5e7 commit 086cfef

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed

core/src/intrinsics/mod.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3016,7 +3016,6 @@ pub(crate) macro const_eval_select {
30163016
/// In other words, the following code has *Undefined Behavior*:
30173017
///
30183018
/// ```no_run
3019-
/// #![feature(is_val_statically_known)]
30203019
/// #![feature(core_intrinsics)]
30213020
/// # #![allow(internal_features)]
30223021
/// use std::hint::unreachable_unchecked;
@@ -3029,7 +3028,6 @@ pub(crate) macro const_eval_select {
30293028
/// may panic, or it may not:
30303029
///
30313030
/// ```no_run
3032-
/// #![feature(is_val_statically_known)]
30333031
/// #![feature(core_intrinsics)]
30343032
/// # #![allow(internal_features)]
30353033
/// use std::intrinsics::is_val_statically_known;
@@ -3062,7 +3060,6 @@ pub(crate) macro const_eval_select {
30623060
/// behave identically:
30633061
///
30643062
/// ```
3065-
/// #![feature(is_val_statically_known)]
30663063
/// #![feature(core_intrinsics)]
30673064
/// # #![allow(internal_features)]
30683065
/// use std::intrinsics::is_val_statically_known;
@@ -3079,7 +3076,11 @@ pub(crate) macro const_eval_select {
30793076
/// # _ = foo(&5_i32);
30803077
/// # _ = bar(&5_i32);
30813078
/// ```
3082-
#[rustc_const_unstable(feature = "is_val_statically_known", issue = "none")]
3079+
#[cfg_attr(
3080+
bootstrap,
3081+
rustc_const_stable(feature = "const_is_val_statically_known", since = "CURRENT_RUSTC_VERSION")
3082+
)]
3083+
#[cfg_attr(not(bootstrap), rustc_const_stable_indirect)]
30833084
#[rustc_nounwind]
30843085
#[unstable(feature = "core_intrinsics", issue = "none")]
30853086
#[rustc_intrinsic]

core/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@
141141
#![feature(internal_impls_macro)]
142142
#![feature(ip)]
143143
#![feature(is_ascii_octdigit)]
144-
#![feature(is_val_statically_known)]
145144
#![feature(lazy_get)]
146145
#![feature(link_cfg)]
147146
#![feature(non_null_from_ref)]

core/src/num/int_macros.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2242,7 +2242,6 @@ macro_rules! int_impl {
22422242
#[must_use = "this returns the result of the operation, \
22432243
without modifying the original"]
22442244
#[inline]
2245-
#[rustc_allow_const_fn_unstable(is_val_statically_known)]
22462245
pub const fn wrapping_pow(self, mut exp: u32) -> Self {
22472246
if exp == 0 {
22482247
return 1;
@@ -2808,7 +2807,6 @@ macro_rules! int_impl {
28082807
without modifying the original"]
28092808
#[inline]
28102809
#[rustc_inherit_overflow_checks]
2811-
#[rustc_allow_const_fn_unstable(is_val_statically_known)]
28122810
pub const fn pow(self, mut exp: u32) -> Self {
28132811
if exp == 0 {
28142812
return 1;

core/src/num/uint_macros.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2174,7 +2174,6 @@ macro_rules! uint_impl {
21742174
#[must_use = "this returns the result of the operation, \
21752175
without modifying the original"]
21762176
#[inline]
2177-
#[rustc_allow_const_fn_unstable(is_val_statically_known)]
21782177
pub const fn wrapping_pow(self, mut exp: u32) -> Self {
21792178
if exp == 0 {
21802179
return 1;
@@ -2688,7 +2687,6 @@ macro_rules! uint_impl {
26882687
without modifying the original"]
26892688
#[inline]
26902689
#[rustc_inherit_overflow_checks]
2691-
#[rustc_allow_const_fn_unstable(is_val_statically_known)]
26922690
pub const fn pow(self, mut exp: u32) -> Self {
26932691
if exp == 0 {
26942692
return 1;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy