Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit cf653c7

Browse files
Update crates/core_simd/src/vector.rs
Co-authored-by: Jubilee <[email protected]>
1 parent 00165ed commit cf653c7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

crates/core_simd/src/vector.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,11 @@ mod sealed {
336336
use sealed::Sealed;
337337

338338
/// 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.
339344
pub unsafe trait SimdElement: Sealed + Copy {
340345
/// The mask element type corresponding to this element type.
341346
type Mask: MaskElement;

0 commit comments

Comments
 (0)