Skip to content

Commit 83b6d84

Browse files
Dummy function to re-add const_transmute feature gate
1 parent 2af7940 commit 83b6d84

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/libcore/intrinsics.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -1287,7 +1287,7 @@ extern "rust-intrinsic" {
12871287
#[stable(feature = "rust1", since = "1.0.0")]
12881288
// NOTE: While this makes the intrinsic const stable, we have some custom code in const fn
12891289
// checks that prevent its use within `const fn`.
1290-
#[rustc_const_stable(feature = "const_transmute", since = "1.46.0")]
1290+
#[rustc_const_stable(feature = "const_transmute_in_consts", since = "1.46.0")]
12911291
pub fn transmute<T, U>(e: T) -> U;
12921292

12931293
/// Returns `true` if the actual type given as `T` requires drop
@@ -2286,3 +2286,7 @@ pub unsafe fn write_bytes<T>(dst: *mut T, val: u8, count: usize) {
22862286
// SAFETY: the safety contract for `write_bytes` must be upheld by the caller.
22872287
unsafe { write_bytes(dst, val, count) }
22882288
}
2289+
2290+
// dummy function to unbreak beta builds
2291+
#[rustc_const_unstable(feature = "const_transmute", issue = "53605")]
2292+
const fn _bar() {}

0 commit comments

Comments
 (0)