-
-
Notifications
You must be signed in to change notification settings - Fork 15k
Tracking Issue for const IoSlice and IoSliceMut methods #146459
Copy link
Copy link
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 RFCS-tracking-unimplementedStatus: The feature has not been implemented.Status: The feature has not been implemented.T-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.
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 RFCS-tracking-unimplementedStatus: The feature has not been implemented.Status: The feature has not been implemented.T-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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Feature gate:
#![feature(io_slice_const)]This is a tracking issue for making the
newandadvancemethods onIoSliceandIoSliceMutconst.In particular, this enables constructing
IoSliceandIoSliceMutin const contexts without users needing to break the platform abstraction by doing the cast themselves. This is useful for statics.Since all current and plausible future platforms use simple slice-like structs, this should not impose a burden when adding a new platform with a different struct.
Public API
Methods
newandadvanceare made const forIoSliceandIoSliceMut.advance_slicesis more complicated and remains non-const.into_slice/as_sliceare unstably const and tracked separately.Steps / History
(Remember to update the
S-tracking-*label when checking boxes.)IoSliceandIoSliceMutmethods unstably const #144090Unresolved Questions
Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩