Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update NonNull pointer provenance methods' documentation #95630

Merged
merged 1 commit into from
Apr 5, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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`].
RalfJung marked this conversation as resolved.
Show resolved Hide resolved
///
/// 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