-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Tracking Issue for feature(const_slice_split_at_mut)
#101804
Comments
…, r=fee1-dead Constify slice.split_at_mut(_unchecked) Tracking Issue: [Tracking Issue for const_slice_split_at_mut](rust-lang#101804) Feature gate: `#![feature(const_slice_split_at_mut)]` Still requires const_mut_refs to be actually used, but this feature removes the need to manually re implement these functions in a user crate.
feature(const_slice_split_at_mut)
…dead Constify slice.split_at_mut(_unchecked) Tracking Issue: [Tracking Issue for const_slice_split_at_mut](rust-lang/rust#101804) Feature gate: `#![feature(const_slice_split_at_mut)]` Still requires const_mut_refs to be actually used, but this feature removes the need to manually re implement these functions in a user crate.
…plit-at-checked, r=jhpratt Stabilize `split_at_checked` Closes rust-lang#119128 For the const version of `slice::split_at_mut_checked`, I'm reusing the `const_slice_split_at_mut` feature flag (rust-lang#101804). I don't if it okay to reuse tracking issues or if it preferred to create new ones...
…plit-at-checked, r=jhpratt Stabilize `split_at_checked` Closes rust-lang#119128 For the const version of `slice::split_at_mut_checked`, I'm reusing the `const_slice_split_at_mut` feature flag (rust-lang#101804). I don't if it okay to reuse tracking issues or if it preferred to create new ones...
Rollup merge of rust-lang#124678 - UserIsntAvailable:feat/stabilize-split-at-checked, r=jhpratt Stabilize `split_at_checked` Closes rust-lang#119128 For the const version of `slice::split_at_mut_checked`, I'm reusing the `const_slice_split_at_mut` feature flag (rust-lang#101804). I don't if it okay to reuse tracking issues or if it preferred to create new ones...
@rust-lang/libs-api this should be ready for stabilization now, once const_mut_refs is stable. :) |
@rfcbot fcp merge
|
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. |
|
Good call. Added it to the Public API description and the stabilization proposal. |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
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. |
Rollup merge of rust-lang#130428 - ink-feather-org:stabilize-const-split-at-mut, r=RalfJung Stabilize `const_slice_split_at_mut` and `const_slice_first_last_chunk` Stabilizes rust-lang#101804 and the remainder of rust-lang#111774. FCP proposed in the tracking issue. Requires rust-lang#130403 (or it would need a rustc_allow_const_fn_unstable for it) Stabilized const API: ```rust // slice impl [T] { pub const fn split_at_mut(&mut self, mid: usize) -> (&mut [T], &mut [T]); pub const fn split_at_mut_unchecked(&mut self, mid: usize) -> (&mut [T], &mut [T]); pub const fn split_at_mut_checked(&mut self, mid: usize) -> Option<(&mut [T], &mut [T])>; pub const fn first_chunk_mut<const N: usize>(&mut self) -> Option<&mut [T; N]>; pub const fn last_chunk_mut<const N: usize>(&mut self) -> Option<&mut [T; N]>; pub const fn split_first_chunk_mut<const N: usize>(&mut self) -> Option<(&mut [T; N], &mut [T])>; pub const fn split_last_chunk_mut<const N: usize>(&mut self) -> Option<(&mut [T; N], &mut [T])>; } ``` Closes rust-lang#101804 Closes rust-lang#111774 cc `@RalfJung`
Feature gate:
#![feature(const_slice_split_at_mut)]
This is a tracking issue for spliting mutable slices in const context.
Public API
Steps / History
split_at_checked
#124678&mut T
in const contexts (const_mut_refs) #57349 to be stabilized.const_slice_from_raw_parts_mut
#130403 since from_raw_parts_mut is used internallyconst_slice_split_at_mut
andconst_slice_first_last_chunk
#130428Unresolved Questions
Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩
The text was updated successfully, but these errors were encountered: