File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 4
4
const_maybe_uninit_as_mut_ptr,
5
5
const_mut_refs,
6
6
convert_float_to_int,
7
+ core_intrinsics,
7
8
decl_macro,
8
9
inline_const,
9
10
intra_doc_pointers,
Original file line number Diff line number Diff line change @@ -175,7 +175,10 @@ where
175
175
#[ must_use = "method returns a new mask and does not mutate the original value" ]
176
176
pub unsafe fn from_int_unchecked ( value : Simd < T , N > ) -> Self {
177
177
// Safety: the caller must confirm this invariant
178
- unsafe { Self ( mask_impl:: Mask :: from_int_unchecked ( value) ) }
178
+ unsafe {
179
+ core:: intrinsics:: assume ( <T as Sealed >:: valid ( value) ) ;
180
+ Self ( mask_impl:: Mask :: from_int_unchecked ( value) )
181
+ }
179
182
}
180
183
181
184
/// Converts a vector of integers to a mask, where 0 represents `false` and -1
You can’t perform that action at this time.
0 commit comments