diff --git a/library/core/src/alloc/layout.rs b/library/core/src/alloc/layout.rs index 49275975f046f..cd5fd77f86597 100644 --- a/library/core/src/alloc/layout.rs +++ b/library/core/src/alloc/layout.rs @@ -226,10 +226,10 @@ impl Layout { /// Creates a `NonNull` that is dangling, but well-aligned for this Layout. /// - /// Note that the pointer value may potentially represent a valid pointer, - /// which means this must not be used as a "not yet initialized" - /// sentinel value. Types that lazily allocate must track initialization by - /// some other means. + /// Note that the address of the returned pointer may potentially + /// be that of a valid pointer, which means this must not be used + /// as a "not yet initialized" sentinel value. + /// Types that lazily allocate must track initialization by some other means. #[unstable(feature = "alloc_layout_extra", issue = "55724")] #[must_use] #[inline] diff --git a/library/core/src/ptr/mod.rs b/library/core/src/ptr/mod.rs index 1a2a5182567b4..b2607e453245a 100644 --- a/library/core/src/ptr/mod.rs +++ b/library/core/src/ptr/mod.rs @@ -885,10 +885,10 @@ pub const fn without_provenance(addr: usize) -> *const T { /// This is useful for initializing types which lazily allocate, like /// `Vec::new` does. /// -/// Note that the pointer value may potentially represent a valid pointer to -/// a `T`, which means this must not be used as a "not yet initialized" -/// sentinel value. Types that lazily allocate must track initialization by -/// some other means. +/// Note that the address of the returned pointer may potentially +/// be that of a valid pointer, which means this must not be used +/// as a "not yet initialized" sentinel value. +/// Types that lazily allocate must track initialization by some other means. #[inline(always)] #[must_use] #[stable(feature = "strict_provenance", since = "1.84.0")] @@ -928,10 +928,10 @@ pub const fn without_provenance_mut(addr: usize) -> *mut T { /// This is useful for initializing types which lazily allocate, like /// `Vec::new` does. /// -/// Note that the pointer value may potentially represent a valid pointer to -/// a `T`, which means this must not be used as a "not yet initialized" -/// sentinel value. Types that lazily allocate must track initialization by -/// some other means. +/// Note that the address of the returned pointer may potentially +/// be that of a valid pointer, which means this must not be used +/// as a "not yet initialized" sentinel value. +/// Types that lazily allocate must track initialization by some other means. #[inline(always)] #[must_use] #[stable(feature = "strict_provenance", since = "1.84.0")] diff --git a/library/core/src/ptr/non_null.rs b/library/core/src/ptr/non_null.rs index 8667361fecc74..e72aa1da2cbe3 100644 --- a/library/core/src/ptr/non_null.rs +++ b/library/core/src/ptr/non_null.rs @@ -109,10 +109,10 @@ impl NonNull { /// This is useful for initializing types which lazily allocate, like /// `Vec::new` does. /// - /// Note that the pointer value may potentially represent a valid pointer to - /// a `T`, which means this must not be used as a "not yet initialized" - /// sentinel value. Types that lazily allocate must track initialization by - /// some other means. + /// Note that the address of the returned pointer may potentially + /// be that of a valid pointer, which means this must not be used + /// as a "not yet initialized" sentinel value. + /// Types that lazily allocate must track initialization by some other means. /// /// # Examples /// diff --git a/library/core/src/ptr/unique.rs b/library/core/src/ptr/unique.rs index e9e13f9e97f84..4302c1b1e4451 100644 --- a/library/core/src/ptr/unique.rs +++ b/library/core/src/ptr/unique.rs @@ -63,10 +63,10 @@ impl Unique { /// This is useful for initializing types which lazily allocate, like /// `Vec::new` does. /// - /// Note that the pointer value may potentially represent a valid pointer to - /// a `T`, which means this must not be used as a "not yet initialized" - /// sentinel value. Types that lazily allocate must track initialization by - /// some other means. + /// Note that the address of the returned pointer may potentially + /// be that of a valid pointer, which means this must not be used + /// as a "not yet initialized" sentinel value. + /// Types that lazily allocate must track initialization by some other means. #[must_use] #[inline] pub const fn dangling() -> Self {