We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 70b1c20 + 97a3a50 commit 7a0cc2fCopy full SHA for 7a0cc2f
crates/core_simd/src/vector.rs
@@ -195,7 +195,7 @@ where
195
196
/// Returns a mutable array reference containing the entire SIMD vector.
197
#[inline]
198
- pub fn as_mut_array(&mut self) -> &mut [T; N] {
+ pub const fn as_mut_array(&mut self) -> &mut [T; N] {
199
// SAFETY: `Simd<T, N>` is just an overaligned `[T; N]` with
200
// potential padding at the end, so pointer casting to a
201
// `&mut [T; N]` is safe.
@@ -324,7 +324,7 @@ where
324
/// ```
325
326
#[track_caller]
327
- pub fn copy_to_slice(self, slice: &mut [T]) {
+ pub const fn copy_to_slice(self, slice: &mut [T]) {
328
assert!(
329
slice.len() >= Self::LEN,
330
"slice length must be at least the number of elements"
0 commit comments