diff options
| author | Folkert de Vries <folkert@folkertdev.nl> | 2025-02-24 18:53:49 +0100 |
|---|---|---|
| committer | Folkert de Vries <folkert@folkertdev.nl> | 2025-02-27 12:23:00 +0100 |
| commit | 4e961dc01538096d649fbdbb8cd8b6979df5bb35 (patch) | |
| tree | 2b51cb5223e7dff1b40540d45275a2c83251ec0c /library | |
| parent | a837e9966b96741f52efd991eb15f70ad6bdda32 (diff) | |
| download | rust-4e961dc01538096d649fbdbb8cd8b6979df5bb35.tar.gz rust-4e961dc01538096d649fbdbb8cd8b6979df5bb35.zip | |
make `simd_insert` and `simd_extract` `const fn`s
Diffstat (limited to 'library')
| -rw-r--r-- | library/core/src/intrinsics/simd.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/core/src/intrinsics/simd.rs b/library/core/src/intrinsics/simd.rs index 3bde183fefb..3881cf90ad7 100644 --- a/library/core/src/intrinsics/simd.rs +++ b/library/core/src/intrinsics/simd.rs @@ -11,7 +11,7 @@ /// `idx` must be in-bounds of the vector. #[rustc_intrinsic] #[rustc_nounwind] -pub unsafe fn simd_insert<T, U>(_x: T, _idx: u32, _val: U) -> T; +pub const unsafe fn simd_insert<T, U>(_x: T, _idx: u32, _val: U) -> T; /// Extracts an element from a vector. /// @@ -22,7 +22,7 @@ pub unsafe fn simd_insert<T, U>(_x: T, _idx: u32, _val: U) -> T; /// `idx` must be in-bounds of the vector. #[rustc_intrinsic] #[rustc_nounwind] -pub unsafe fn simd_extract<T, U>(_x: T, _idx: u32) -> U; +pub const unsafe fn simd_extract<T, U>(_x: T, _idx: u32) -> U; /// Adds two simd vectors elementwise. /// |
