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.
1 parent 00165ed commit cf653c7Copy full SHA for cf653c7
crates/core_simd/src/vector.rs
@@ -336,6 +336,11 @@ mod sealed {
336
use sealed::Sealed;
337
338
/// Marker trait for types that may be used as SIMD vector elements.
339
+/// SAFETY: This trait, when implemented, asserts the compiler can monomorphize
340
+/// `#[repr(simd)]` structs with the marked type as an element.
341
+/// Strictly, it is valid to impl if the vector will not be miscompiled.
342
+/// Practically, it is user-unfriendly to impl it if the vector won't compile,
343
+/// even when no soundness guarantees are broken by allowing the user to try.
344
pub unsafe trait SimdElement: Sealed + Copy {
345
/// The mask element type corresponding to this element type.
346
type Mask: MaskElement;
0 commit comments