-
Notifications
You must be signed in to change notification settings - Fork 14k
Stabilise as_array in [_] and *const [_]; stabilise as_mut_array in [_] and *mut [_].
#147540
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
Conversation
|
r? @ibraheemdev rustbot has assigned @ibraheemdev. Use |
|
@rustbot label needs-fcp |
eb35f4d to
f479981
Compare
This comment has been minimized.
This comment has been minimized.
as_array in [_] and *const [_] and as_mut_array in [_] and *mut [_].as_array in [_] and *const [_]; stabilise as_mut_array in [_] and *mut [_].
f479981 to
a20b847
Compare
This comment has been minimized.
This comment has been minimized.
tidy [features]: /checkout/library/alloc/src/sync.rs:1229: feature gate slice_as_array has inconsistent `issue`: "133508" mismatches the previous `issue` of "none"The specific tidy error is about I think since this is a partial stabilization of IIUC, the intended workflow is to rename the feature on the being-stabilized functions, and leave the feature name the same on the remaining-unstable functions, like was done in #94640 (it stablized If you want to cherry-pick zachs18@e801f3e it should fix the tidy error I think. |
|
Oh, I wasn't aware. Thank you! |
a20b847 to
6c79c02
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
This comment was marked as resolved.
This comment was marked as resolved.
6c79c02 to
f38f442
Compare
|
r? libs-api |
|
☔ The latest upstream changes (presumably #148507) made this pull request unmergeable. Please resolve the merge conflicts. |
f38f442 to
79df977
Compare
This comment has been minimized.
This comment has been minimized.
|
☔ The latest upstream changes (presumably #148544) made this pull request unmergeable. Please resolve the merge conflicts. |
|
r=me once conflicts are resolved. |
79df977 to
e0630f8
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
…ay' in '[_]' and '*mut [_]'; Update feature gate and tracking issue for 'alloc_slice_into_array' items;
e0630f8 to
fa8e864
Compare
|
@bors r=Amanieu rollup |
|
@bjoernager: 🔑 Insufficient privileges: Not in reviewers |
|
@bjoernager: 🔑 Insufficient privileges: not in try users |
|
@rustbot label -needs-fcp |
Rollup of 10 pull requests Successful merges: - #145656 (Stabilize s390x `vector` target feature and `is_s390x_feature_detected!` macro) - #147024 (std_detect: Support run-time detection on OpenBSD using elf_aux_info) - #147534 (Implement SIMD funnel shifts in const-eval/Miri) - #147540 (Stabilise `as_array` in `[_]` and `*const [_]`; stabilise `as_mut_array` in `[_]` and `*mut [_]`.) - #147686 (update isolate_highest_one for NonZero<T>) - #148230 (rustdoc: Properly highlight shebang, frontmatter & weak keywords in source code pages and code blocks) - #148555 (Fix rust-by-example spanish translation) - #148556 (Fix suggestion for returning async closures) - #148585 ([rustdoc] Replace `print` methods with functions to improve code readability) - #148600 (re-use `self.get_all_attrs` result for pass indirectly attribute) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 10 pull requests Successful merges: - #145656 (Stabilize s390x `vector` target feature and `is_s390x_feature_detected!` macro) - #147024 (std_detect: Support run-time detection on OpenBSD using elf_aux_info) - #147534 (Implement SIMD funnel shifts in const-eval/Miri) - #147540 (Stabilise `as_array` in `[_]` and `*const [_]`; stabilise `as_mut_array` in `[_]` and `*mut [_]`.) - #147686 (update isolate_highest_one for NonZero<T>) - #148230 (rustdoc: Properly highlight shebang, frontmatter & weak keywords in source code pages and code blocks) - #148555 (Fix rust-by-example spanish translation) - #148556 (Fix suggestion for returning async closures) - #148585 ([rustdoc] Replace `print` methods with functions to improve code readability) - #148600 (re-use `self.get_all_attrs` result for pass indirectly attribute) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 10 pull requests Successful merges: - #145656 (Stabilize s390x `vector` target feature and `is_s390x_feature_detected!` macro) - #147024 (std_detect: Support run-time detection on OpenBSD using elf_aux_info) - #147534 (Implement SIMD funnel shifts in const-eval/Miri) - #147540 (Stabilise `as_array` in `[_]` and `*const [_]`; stabilise `as_mut_array` in `[_]` and `*mut [_]`.) - #147686 (update isolate_highest_one for NonZero<T>) - #148230 (rustdoc: Properly highlight shebang, frontmatter & weak keywords in source code pages and code blocks) - #148555 (Fix rust-by-example spanish translation) - #148556 (Fix suggestion for returning async closures) - #148585 ([rustdoc] Replace `print` methods with functions to improve code readability) - #148600 (re-use `self.get_all_attrs` result for pass indirectly attribute) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #147540 - bjoernager:slice-as-array, r=Amanieu Stabilise `as_array` in `[_]` and `*const [_]`; stabilise `as_mut_array` in `[_]` and `*mut [_]`. Tracking issue: #133508 Closes: #133508 This PR stabilises the `as_array` and `as_mut_array` associated functions from the `core_slice_as_array` feature gate: ```rust // core::slice impl<T> [T] { pub const fn as_array<const N: usize>(&self) -> Option<&[T; N]>; pub const fn as_mut_array<const N: usize>(&mut self) -> Option<&mut [T; N]>; } // core::ptr impl<T> *const [T] { pub const fn as_array<const N: usize>(self) -> Option<*const [T; N]>; } impl<T> *mut [T] { pub const fn as_mut_array<const N: usize>(self) -> Option<*mut [T; N]>; } ``` It also updates the feature gates and tracking issues for all items associated with the previous `slice_as_array` tracking issue (including these four that are being stabilised). ~~FCP missing.~~
Tracking issue: #133508
Closes: #133508
This PR stabilises the
as_arrayandas_mut_arrayassociated functions from thecore_slice_as_arrayfeature gate:It also updates the feature gates and tracking issues for all items associated with the previous
slice_as_arraytracking issue (including these four that are being stabilised).FCP missing.