-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Stabilize (const_)slice_ptr_len and (const_)slice_ptr_is_empty_nonnull #123868
Conversation
r? libs-api |
@bors r+ |
Rollup of 4 pull requests Successful merges: - rust-lang#123835 (Avoid more NonNull-raw-NonNull roundtrips in Vec) - rust-lang#123868 (Stabilize (const_)slice_ptr_len and (const_)slice_ptr_is_empty_nonnull) - rust-lang#123872 (Fix Pietro's entry in the mailmap) - rust-lang#123873 (Merge cuviper in the mailmap) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#123868 - eduardosm:stabilize-slice_ptr_len, r=jhpratt Stabilize (const_)slice_ptr_len and (const_)slice_ptr_is_empty_nonnull Stabilized API: ```rust impl<T> *mut [T] { pub const fn len(self) -> usize; pub const fn is_empty(self) -> bool; } impl<T> *const [T] { pub const fn len(self) -> usize; pub const fn is_empty(self) -> bool; } impl<T> NonNull<[T]> { pub const fn is_empty(self) -> bool; } ``` FCP completed in tracking issue: rust-lang#71146
#[rustc_const_unstable(feature = "const_slice_ptr_len", issue = "71146")] | ||
#[stable(feature = "slice_ptr_len", since = "CURRENT_RUSTC_VERSION")] | ||
#[rustc_const_stable(feature = "const_slice_ptr_len", since = "CURRENT_RUSTC_VERSION")] | ||
#[rustc_allow_const_fn_unstable(ptr_metadata)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rust-lang/libs-api please make sure that any time this attribute is added, @rust-lang/wg-const-eval is involved. The point of the attribute is to ensure we don't accidentally expose const-features on stable that are not ready yet for stable; that only works if we get the time to have a look at every new use of this attribute.
Stabilized API:
FCP completed in tracking issue: #71146