Skip to content

Commit 6b3c599

Browse files
committed
Add missing safety comment
1 parent 4076ba8 commit 6b3c599

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

crates/core_simd/src/vector.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,11 +741,15 @@ unsafe impl SimdElement for f64 {
741741
}
742742

743743
impl<T> Sealed for *const T {}
744+
745+
// Safety: const pointers are valid SIMD element types, and are supported by this API
744746
unsafe impl<T> SimdElement for *const T {
745747
type Mask = isize;
746748
}
747749

748750
impl<T> Sealed for *mut T {}
751+
752+
// Safety: mut pointers are valid SIMD element types, and are supported by this API
749753
unsafe impl<T> SimdElement for *mut T {
750754
type Mask = isize;
751755
}

0 commit comments

Comments
 (0)