-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-arrayArea: `[T; N]`Area: `[T; N]`A-const-genericsArea: const generics (parameters and arguments)Area: const generics (parameters and arguments)A-sliceArea: `[T]`Area: `[T]`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 RFCF-generic_const_exprs`#![feature(generic_const_exprs)]``#![feature(generic_const_exprs)]`Libs-TrackedLibs issues that are tracked on the team's project board.Libs issues that are tracked on the team's project board.P-lowLow priorityLow priorityT-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.
Description
The feature gate for the issue is #![feature(array_chunks)]
.
Also tracks as_(r)chunks(_mut)
in #![feature(slice_as_chunks)]
-- these were FCPed starting at #74985 (comment) below.
About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also uses as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Steps
-
RestrictMakeN
to values greater than 0 at compile time instead of using a runtime panic.<[T]>::array_*
methods fail to compile on 0 len arrays #99471 - Support calls where
N == 0
is unreachable due to conditionals Tracking Issue for slice::array_chunks #74985 (comment)- It was decided that a runtime panic is appropriate: Tracking Issue for slice::array_chunks #74985 (comment)
- Adjust documentation (see instructions on rustc-dev-guide)
- Stabilization PR (see instructions on rustc-dev-guide)
- slice_as_chunks: Stabilize
slice_as_chunks
library feature #139656 - array_chunks
- slice_as_chunks: Stabilize
Unresolved Questions
- Iterator vs slices, Does
[T]::array_chunks
really need to be an iterator? #76354
Implementation history
- implemented in add
slice::array_chunks
to std #74373 - mut version in Add
slice::array_chunks_mut
#75021 as_chunks{_mut}
in Add [T]::as_chunks(_mut) #76635as_rchunks{_mut}
and unchecked versions in Addas_rchunks
(and friends) to slices #78818- const
as_(r)chunk
in constifyslice_as_chunks
(unstable) #111453 - Stabilize
slice_as_chunks
library feature #139656
stepancheg, MrCroxx, jdahlstrom, DianaNites, PonasKovas and 8 moreleo60228, CPerezz, rgreenblatt, dimpolo, eopb and 60 more
Metadata
Metadata
Assignees
Labels
A-arrayArea: `[T; N]`Area: `[T; N]`A-const-genericsArea: const generics (parameters and arguments)Area: const generics (parameters and arguments)A-sliceArea: `[T]`Area: `[T]`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 RFCF-generic_const_exprs`#![feature(generic_const_exprs)]``#![feature(generic_const_exprs)]`Libs-TrackedLibs issues that are tracked on the team's project board.Libs issues that are tracked on the team's project board.P-lowLow priorityLow priorityT-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.