Stabilize (const_)slice_ptr_len and (const_)slice_ptr_is_empty_nonnull#123868
Merged
bors merged 1 commit intorust-lang:masterfrom Apr 13, 2024
eduardosm:stabilize-slice_ptr_len
Merged
Stabilize (const_)slice_ptr_len and (const_)slice_ptr_is_empty_nonnull#123868bors merged 1 commit intorust-lang:masterfrom eduardosm:stabilize-slice_ptr_len
bors merged 1 commit intorust-lang:masterfrom
eduardosm:stabilize-slice_ptr_len
Conversation
Collaborator
Member
|
r? libs-api |
Member
|
@bors r+ |
Collaborator
7 tasks
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 13, 2024
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
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 13, 2024
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
RalfJung
reviewed
Aug 31, 2024
| #[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)] |
Member
There was a problem hiding this comment.
@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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stabilized API:
FCP completed in tracking issue: #71146