-
Couldn't load subscription status.
- Fork 13.9k
Open
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.final-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.In the final comment period and will be merged soon unless new substantive objections are raised.needs-fcpThis change is insta-stable, or significant enough to need a team FCP to proceed.This change is insta-stable, or significant enough to need a team FCP to proceed.
Description
Feature gate: #![feature(core_slice_as_array)]
This is a tracking issue for adding conversion functions going from slices to arrays.
This tracking issue has been branched into #148082.
Public API
// 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]>;
}Steps / History
- API change proposal (ACP): #496
- Implementation:
- ... for
[_],*const [_], and*mut [_]: Addas_arrayandas_mut_arrayconversion methods to slices. #133512 - Fix docs for
<[_]>::as_array: Fix docs for<[T]>::as_array. #133743
- ... for
- Final comment period (FCP)
- Stabilisation: Stabilise
as_arrayin[_]and*const [_]; stabiliseas_mut_arrayin[_]and*mut [_]. #147540
Unresolved Questions
- None yet.
joseluis, YYMMYB, cxw620, MathiasPius, TheNullicorn and 2 more
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.final-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.In the final comment period and will be merged soon unless new substantive objections are raised.needs-fcpThis change is insta-stable, or significant enough to need a team FCP to proceed.This change is insta-stable, or significant enough to need a team FCP to proceed.