Skip to content

Tracking Issue for nonnull_provenance #135243

Closed
@RalfJung

Description

@RalfJung
Member

Feature gate: #![feature(nonnull_provenance)]

This is a tracking issue for some provenance functions on NonNull that were missed in the initial strict provenance stabilization.

Public API

// core::ptr

impl<T> NonNull<T> {
    pub const fn without_provenance(addr: NonZero<usize>) -> Self;
    pub fn from_exposed_provenance(addr: NonZero<usize>) -> Self;
}
impl<T: ?Sized> NonNull<T> {
    pub fn expose_provenance(self) -> NonZero<usize>;
}

Steps / History

Unresolved Questions

  • None yet.

Footnotes

  1. https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html

Activity

added
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC
T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.
on Jan 8, 2025
added a commit that references this issue on Jan 9, 2025

Rollup merge of rust-lang#135242 - RalfJung:nonnull-provenance, r=jhp…

04e8715
added a commit that references this issue on Jan 9, 2025

Rollup merge of rust-lang#135242 - RalfJung:nonnull-provenance, r=jhp…

225dc79
added a commit that references this issue on Jan 9, 2025
scottmcm

scottmcm commented on Jan 10, 2025

@scottmcm
Member

This without_provenance taking NonZero is beautiful, since it means that code (in Rc) that used to be NonNull::new_unchecked(ptr::without_provenance(MAX)) can now be safe 👍

added a commit that references this issue on Jan 11, 2025

Rollup merge of rust-lang#135347 - samueltardieu:push-qvyxtxsqyxyr, r…

46222ce
added a commit that references this issue on Jan 11, 2025
added 2 commits that reference this issue on Jan 14, 2025

Auto merge of rust-lang#135344 - scottmcm:safe-dangling, r=<try>

Auto merge of rust-lang#135344 - scottmcm:safe-dangling, r=joboet

11 remaining items

added
final-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.
on May 29, 2025
rfcbot

rfcbot commented on May 29, 2025

@rfcbot
Collaborator

🔔 This is now entering its final comment period, as per the review above. 🔔

rfcbot

rfcbot commented on Jun 8, 2025

@rfcbot
Collaborator

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

This will be merged soon.

added
to-announceAnnounce this issue on triage meeting
and removed
final-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.
on Jun 8, 2025
RalfJung

RalfJung commented on Jun 9, 2025

@RalfJung
MemberAuthor

Stabilization PR: #142238

added a commit that references this issue on Jun 9, 2025

Rollup merge of rust-lang#142238 - RalfJung:nonnull_provenance, r=wor…

fd06f6d
added a commit that references this issue on Jun 9, 2025
added a commit that references this issue on Jun 17, 2025

Rollup merge of rust-lang#142238 - RalfJung:nonnull_provenance, r=wor…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.to-announceAnnounce this issue on triage meeting

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @Amanieu@RalfJung@scottmcm@rfcbot

      Issue actions

        Tracking Issue for nonnull_provenance · Issue #135243 · rust-lang/rust