Skip to content

Commit

Permalink
Rollup merge of #95630 - declanvk:update-nonnull-doc, r=RalfJung
Browse files Browse the repository at this point in the history
Update `NonNull` pointer provenance methods' documentation

 - Add links to equivalent methods on raw pointers
  • Loading branch information
Dylan-DPC authored Apr 4, 2022
2 parents 78f81f0 + 637592d commit 1c2b4b7
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions library/core/src/ptr/non_null.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,10 @@ impl<T: ?Sized> NonNull<T> {

/// Gets the "address" portion of the pointer.
///
/// For more details see the equivalent method on a raw pointer, [`pointer::addr`].
///
/// This API and its claimed semantics are part of the Strict Provenance experiment,
/// see the [module documentation][crate::ptr] for details.
/// see the [`ptr` module documentation][crate::ptr].
#[must_use]
#[inline]
#[unstable(feature = "strict_provenance", issue = "95228")]
Expand All @@ -272,8 +274,10 @@ impl<T: ?Sized> NonNull<T> {

/// Creates a new pointer with the given address.
///
/// For more details see the equivalent method on a raw pointer, [`pointer::with_addr`].
///
/// This API and its claimed semantics are part of the Strict Provenance experiment,
/// see the [module documentation][crate::ptr] for details.
/// see the [`ptr` module documentation][crate::ptr].
#[must_use]
#[inline]
#[unstable(feature = "strict_provenance", issue = "95228")]
Expand All @@ -287,10 +291,10 @@ impl<T: ?Sized> NonNull<T> {

/// Creates a new pointer by mapping `self`'s address to a new one.
///
/// This is a convenience for [`with_addr`][Self::with_addr], see that method for details.
/// For more details see the equivalent method on a raw pointer, [`pointer::map_addr`].
///
/// This API and its claimed semantics are part of the Strict Provenance experiment,
/// see the [module documentation][crate::ptr] for details.
/// see the [`ptr` module documentation][crate::ptr].
#[must_use]
#[inline]
#[unstable(feature = "strict_provenance", issue = "95228")]
Expand Down

0 comments on commit 1c2b4b7

Please sign in to comment.