Closed
Description
opened on Dec 20, 2019
Current candidates with feature = const_option
:
impl<T> Option<T> {
pub const fn as_mut(&mut self) -> Option<&mut T>;
pub const fn expect(self, msg: &str) -> T;
pub const fn unwrap(self) -> T;
pub const unsafe fn unwrap_unchecked(self) -> T;
pub const fn take(&mut self) -> Option<T>;
pub const fn replace(&mut self, value: T) -> Option<T>;
}
impl<T> Option<&T> {
pub const fn copied(self) -> Option<T>
where
T: Copy;
}
impl<T> Option<&mut T> {
pub const fn copied(self) -> Option<T>
where
T: Copy;
}
impl<T, E> Option<Result<T, E>> {
pub const fn transpose(self) -> Result<Option<T>, E>
}
impl<T> Option<Option<T>> {
pub const fn flatten(self) -> Option<T>;
}
See also the meta-tracking issue for const fns, #57563.
Blocked on:
- Tracking issue for
&mut T
in const contexts (const_mut_refs) #57349 - Tracking Issue for const_replace #83164
Also see the corresponding Result
tracking issue: #82814.
Metadata
Assignees
Labels
Area: Constant evaluation, covers all const contexts (static, const fn, ...)Category: An issue tracking the progress of sth. like the implementation of an RFCLibs issues that are tracked on the team's project board.Relevant to the library API team, which will review and decide on the PR/issue.This issue / PR is in PFCP or FCP with a disposition to merge it.The final comment period is finished for this PR / Issue.
Activity