1
Fork 0

Revert "Revert "Merge pull request #385 from workingjubilee/make-an-ass-out-of-u-and-me""

This reverts commit 644bdfb2ac.
This commit is contained in:
Caleb Zulawski 2024-02-17 11:18:31 -05:00
parent 061d5acd93
commit 44b4d26273

View file

@ -174,7 +174,10 @@ where
#[must_use = "method returns a new mask and does not mutate the original value"]
pub unsafe fn from_int_unchecked(value: Simd<T, N>) -> Self {
// Safety: the caller must confirm this invariant
unsafe { Self(mask_impl::Mask::from_int_unchecked(value)) }
unsafe {
core::intrinsics::assume(<T as Sealed>::valid(value));
Self(mask_impl::Mask::from_int_unchecked(value))
}
}
/// Converts a vector of integers to a mask, where 0 represents `false` and -1