From 95ae48e8e642d48f49532f5cb470b104f0d7f5b0 Mon Sep 17 00:00:00 2001 From: Yilin Chen <1479826151@qq.com> Date: Thu, 16 Jul 2026 01:55:32 +0800 Subject: [PATCH] Fix safety doc in intrinsics::simd --- library/core/src/intrinsics/simd/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/library/core/src/intrinsics/simd/mod.rs b/library/core/src/intrinsics/simd/mod.rs index 9311dcc9bd00e..903fd77661b2d 100644 --- a/library/core/src/intrinsics/simd/mod.rs +++ b/library/core/src/intrinsics/simd/mod.rs @@ -371,8 +371,8 @@ pub const unsafe fn simd_shuffle(x: T, y: T, idx: U) -> V; /// `val`. /// /// # Safety -/// Unmasked values in `T` must be readable as if by `::read` (e.g. aligned to the element -/// type). +/// Each pointer in `ptr` whose corresponding value in `mask` is `!0` must be readable as if by +/// [`ptr::read`][crate::ptr::read] (e.g. aligned to the element type). /// /// `mask` must only contain `0` or `!0` values. #[rustc_intrinsic] @@ -395,8 +395,8 @@ pub const unsafe fn simd_gather(val: T, ptr: U, mask: V) -> T; /// (This is relevant in case two of the stores overlap.) /// /// # Safety -/// Unmasked values in `T` must be writeable as if by `::write` (e.g. aligned to the element -/// type). +/// Each pointer in `ptr` whose corresponding value in `mask` is `!0` must be writable as if by +/// [`ptr::write`][crate::ptr::write] (e.g. aligned to the element type). /// /// `mask` must only contain `0` or `!0` values. #[rustc_intrinsic]