From e5db1ecc8209e90982cc4603514028ef2210e592 Mon Sep 17 00:00:00 2001 From: Caleb Zulawski Date: Thu, 4 Aug 2022 19:46:39 -0400 Subject: [PATCH] Fix documentation --- crates/core_simd/src/elements/const_ptr.rs | 6 +++--- crates/core_simd/src/elements/mut_ptr.rs | 4 ++-- crates/core_simd/src/lib.rs | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/crates/core_simd/src/elements/const_ptr.rs b/crates/core_simd/src/elements/const_ptr.rs index 27b41019dc8..0a3d4ec4087 100644 --- a/crates/core_simd/src/elements/const_ptr.rs +++ b/crates/core_simd/src/elements/const_ptr.rs @@ -27,7 +27,7 @@ pub trait SimdConstPtr: Copy + Sealed { /// directly cast into a valid pointer. /// /// This method semantically discards *provenance* and - /// *address-space* information. To properly restore that information, use [`with_addr`]. + /// *address-space* information. To properly restore that information, use [`Self::with_addr`]. /// /// Equivalent to calling [`pointer::addr`] on each lane. fn addr(self) -> Self::Usize; @@ -41,12 +41,12 @@ pub trait SimdConstPtr: Copy + Sealed { fn with_addr(self, addr: Self::Usize) -> Self; /// Gets the "address" portion of the pointer, and "exposes" the provenance part for future use - /// in [`from_exposed_addr`]. + /// in [`Self::from_exposed_addr`]. fn expose_addr(self) -> Self::Usize; /// Convert an address back to a pointer, picking up a previously "exposed" provenance. /// - /// Equivalent to calling [`pointer::from_exposed_addr`] on each lane. + /// Equivalent to calling [`core::ptr::from_exposed_addr`] on each lane. fn from_exposed_addr(addr: Self::Usize) -> Self; /// Calculates the offset from a pointer using wrapping arithmetic. diff --git a/crates/core_simd/src/elements/mut_ptr.rs b/crates/core_simd/src/elements/mut_ptr.rs index 59a8b6293b5..e6aa9808f37 100644 --- a/crates/core_simd/src/elements/mut_ptr.rs +++ b/crates/core_simd/src/elements/mut_ptr.rs @@ -38,12 +38,12 @@ pub trait SimdMutPtr: Copy + Sealed { fn with_addr(self, addr: Self::Usize) -> Self; /// Gets the "address" portion of the pointer, and "exposes" the provenance part for future use - /// in [`from_exposed_addr`]. + /// in [`Self::from_exposed_addr`]. fn expose_addr(self) -> Self::Usize; /// Convert an address back to a pointer, picking up a previously "exposed" provenance. /// - /// Equivalent to calling [`pointer::from_exposed_addr`] on each lane. + /// Equivalent to calling [`core::ptr::from_exposed_addr_mut`] on each lane. fn from_exposed_addr(addr: Self::Usize) -> Self; /// Calculates the offset from a pointer using wrapping arithmetic. diff --git a/crates/core_simd/src/lib.rs b/crates/core_simd/src/lib.rs index 715f258f617..05ac3e9338b 100644 --- a/crates/core_simd/src/lib.rs +++ b/crates/core_simd/src/lib.rs @@ -7,7 +7,8 @@ repr_simd, simd_ffi, staged_api, - stdsimd + stdsimd, + strict_provenance )] #![cfg_attr(feature = "generic_const_exprs", feature(generic_const_exprs))] #![cfg_attr(feature = "generic_const_exprs", allow(incomplete_features))]