Skip to content

Commit c705775

Browse files
Fix load/store safety comments to require aligned T
Fixes: #382
1 parent 80ff6a5 commit c705775

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/core_simd/src/vector.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ where
194194
/// With padding, `read_unaligned` will read past the end of an array of N elements.
195195
///
196196
/// # Safety
197-
/// Reading `ptr` must be safe, as if by `<*const [T; N]>::read_unaligned`.
197+
/// Reading `ptr` must be safe, as if by `<*const [T; N]>::read`.
198198
#[inline]
199199
const unsafe fn load(ptr: *const [T; N]) -> Self {
200200
// There are potentially simpler ways to write this function, but this should result in
@@ -215,7 +215,7 @@ where
215215
/// See `load` as to why this function is necessary.
216216
///
217217
/// # Safety
218-
/// Writing to `ptr` must be safe, as if by `<*mut [T; N]>::write_unaligned`.
218+
/// Writing to `ptr` must be safe, as if by `<*mut [T; N]>::write`.
219219
#[inline]
220220
const unsafe fn store(self, ptr: *mut [T; N]) {
221221
// There are potentially simpler ways to write this function, but this should result in

0 commit comments

Comments
 (0)