diff options
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/intrinsics.rs | 4 | ||||
| -rw-r--r-- | src/libcore/lib.rs | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs index b3e43cd7994..540a8cfb290 100644 --- a/src/libcore/intrinsics.rs +++ b/src/libcore/intrinsics.rs @@ -1285,7 +1285,9 @@ extern "rust-intrinsic" { /// } /// ``` #[stable(feature = "rust1", since = "1.0.0")] - #[rustc_const_unstable(feature = "const_transmute", issue = "53605")] + // NOTE: While this makes the intrinsic const stable, we have some custom code in const fn + // checks that prevent its use within `const fn`. + #[rustc_const_stable(feature = "const_transmute", since = "1.46.0")] pub fn transmute<T, U>(e: T) -> U; /// Returns `true` if the actual type given as `T` requires drop diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs index 692d91bd61d..820c0a49e7f 100644 --- a/src/libcore/lib.rs +++ b/src/libcore/lib.rs @@ -140,7 +140,7 @@ #![feature(rtm_target_feature)] #![feature(f16c_target_feature)] #![feature(hexagon_target_feature)] -#![feature(const_transmute)] +#![cfg_attr(not(bootstrap), feature(const_fn_transmute))] #![feature(abi_unadjusted)] #![feature(adx_target_feature)] #![feature(maybe_uninit_slice)] |
