Skip to content

Commit 32f1e3a

Browse files
oli-obkgnzlbg
authored andcommitted
Add const unstability attributes
These are needed for rustc to be able to correctly handle stability of constness of intrinsics. Without either `rustc_const_unstable` or `rustc_const_stable` an intrinsic is not const evaluable at all.
1 parent b51ba3f commit 32f1e3a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crates/core_arch/src/simd_llvm.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ extern "platform-intrinsic" {
2525
pub fn simd_shuffle64<T, U>(x: T, y: T, idx: [u32; 64]) -> U;
2626
#[rustc_args_required_const(2)]
2727
pub fn simd_shuffle128<T, U>(x: T, y: T, idx: [u32; 128]) -> U;
28-
28+
29+
#[rustc_const_unstable(feature = "const_simd_insert", issue = "0")]
2930
pub fn simd_insert<T, U>(x: T, idx: u32, val: U) -> T;
31+
#[rustc_const_unstable(feature = "const_simd_extract", issue = "0")]
3032
pub fn simd_extract<T, U>(x: T, idx: u32) -> U;
3133
//pub fn simd_select
3234
pub fn simd_bitmask<T, U>(x: T) -> U;

0 commit comments

Comments
 (0)