rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
98.89k stars 12.78k forks source link

Tracking Issue for `const_nonnull_new` #93235

Open lilasta opened 2 years ago

lilasta commented 2 years ago

Feature gate: #![feature(const_nonnull_new)]

This is a tracking issue for implementing NonNull::new.

Public API

// core::ptr
impl<T: ?Sized> NonNull<T> {
    pub const fn new(ptr: *mut T) -> Option<Self>;
}

Steps / History

Unresolved Questions

workingjubilee commented 1 month ago

Quasi-blocked on https://github.com/rust-lang/rust/issues/93235

RalfJung commented 1 week ago

Quasi-blocked on #93235

I assume you mean https://github.com/rust-lang/rust/issues/74939.

That one just finished FCP, so we can now move ahead with NonNull::new. :) @rust-lang/libs-api this should be, finally, ready to be stabilized.

dtolnay commented 1 week ago

@rfcbot fcp merge

rfcbot commented 1 week ago

Team member @dtolnay has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.