Closed
Description
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
- Implementation: add missing provenance APIs on NonNull #135242Final comment period (FCP)1Stabilization PR
Unresolved Questions
- None yet.
Footnotes
Metadata
Metadata
Assignees
Labels
Category: An issue tracking the progress of sth. like the implementation of an RFCRelevant to the library API team, which will review and decide on the PR/issue.This issue / PR is in PFCP or FCP with a disposition to merge it.The final comment period is finished for this PR / Issue.Announce this issue on triage meeting
Activity
Rollup merge of rust-lang#135242 - RalfJung:nonnull-provenance, r=jhp…
Rollup merge of rust-lang#135242 - RalfJung:nonnull-provenance, r=jhp…
Unrolled build for rust-lang#135242
NonNull::without_provenance
#135343scottmcm commentedon Jan 10, 2025
This
without_provenance
takingNonZero
is beautiful, since it means that code (inRc
) that used to beNonNull::new_unchecked(ptr::without_provenance(MAX))
can now be safe 👍dangling
/without_provenance
#135344NonNull::without_provenance
within the standard library #135347Rollup merge of rust-lang#135347 - samueltardieu:push-qvyxtxsqyxyr, r…
Unrolled build for rust-lang#135347
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
rfcbot commentedon May 29, 2025
🔔 This is now entering its final comment period, as per the review above. 🔔
rfcbot commentedon Jun 8, 2025
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.
RalfJung commentedon Jun 9, 2025
Stabilization PR: #142238
Rollup merge of rust-lang#142238 - RalfJung:nonnull_provenance, r=wor…
Unrolled build for #142238
Rollup merge of #142238 - RalfJung:nonnull_provenance, r=workingjubilee
Rollup merge of #142238 - RalfJung:nonnull_provenance, r=workingjubilee
Rollup merge of rust-lang#142238 - RalfJung:nonnull_provenance, r=wor…