-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
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.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.
Description
Feature gate: #![feature(const_maybe_uninit_assume_init)]
This is a tracking issue for turning the methods assume_init
, assume_init_ref
, assume_init_mut
, slice_assume_init_ref
, slice_assume_init_mut
of MaybeUninit
into const fn
s. Note that the implementation of the latter two slice related methods are currently behind maybe_uninit_slice
#63569, while the constness is behind const_maybe_uninit_assume_init
.
Public API
impl<T> MaybeUninit<T> {
pub const unsafe fn assume_init(self) -> T;
pub const unsafe fn assume_init_ref(&self) -> &T;
pub const unsafe fn assume_init_mut(&mut self) -> &mut T;
}
// These function impls are behind `maybe_uninit_slice` while the constnes is `const_maybe_uninit_assume_init` (this issue)
impl<T> MaybeUninit<T> {
pub const unsafe fn slice_assume_init_ref(slice: &[Self]) -> &[T];
pub const unsafe fn slice_assume_init_mut(slice: &mut [Self]) -> &mut [T];
}
Steps / History
- Implementation: Constier maybe uninit #79621
- Stabilize some
MaybeUninit
behavior as const #90896 (assume_init
andassume_init_ref
)
Unresolved Questions
- None yet.
schneiderfelipe
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.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.