File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -473,8 +473,8 @@ where
473
473
#[ inline]
474
474
#[ must_use = "method returns a new vector and does not mutate the original inputs" ]
475
475
pub fn interleave ( self , other : Self ) -> ( Self , Self ) {
476
- // Safety: swizzles are safe for masks
477
476
let ( lo, hi) = self . to_int ( ) . interleave ( other. to_int ( ) ) ;
477
+ // Safety: swizzles are safe for masks
478
478
unsafe { ( Self :: from_int_unchecked ( lo) , Self :: from_int_unchecked ( hi) ) }
479
479
}
480
480
@@ -502,8 +502,8 @@ where
502
502
#[ inline]
503
503
#[ must_use = "method returns a new vector and does not mutate the original inputs" ]
504
504
pub fn deinterleave ( self , other : Self ) -> ( Self , Self ) {
505
- // Safety: swizzles are safe for masks
506
505
let ( even, odd) = self . to_int ( ) . deinterleave ( other. to_int ( ) ) ;
506
+ // Safety: swizzles are safe for masks
507
507
unsafe {
508
508
(
509
509
Self :: from_int_unchecked ( even) ,
Original file line number Diff line number Diff line change @@ -442,6 +442,9 @@ where
442
442
///
443
443
/// When the element is disabled, that memory location is not accessed and the corresponding
444
444
/// value from `or` is passed through.
445
+ ///
446
+ /// # Safety
447
+ /// Enabled loads must not exceed the length of `slice`.
445
448
#[ must_use]
446
449
#[ inline]
447
450
pub unsafe fn load_select_unchecked (
@@ -459,6 +462,9 @@ where
459
462
///
460
463
/// When the element is disabled, that memory location is not accessed and the corresponding
461
464
/// value from `or` is passed through.
465
+ ///
466
+ /// # Safety
467
+ /// Enabled `ptr` elements must be safe to read as if by `std::ptr::read`.
462
468
#[ must_use]
463
469
#[ inline]
464
470
pub unsafe fn load_select_ptr (
@@ -1214,6 +1220,7 @@ fn lane_indices<const N: usize>() -> Simd<usize, N>
1214
1220
where
1215
1221
LaneCount < N > : SupportedLaneCount ,
1216
1222
{
1223
+ #![ allow( clippy:: needless_range_loop) ]
1217
1224
let mut index = [ 0 ; N ] ;
1218
1225
for i in 0 ..N {
1219
1226
index[ i] = i;
You can’t perform that action at this time.
0 commit comments