-
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 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.
Description
Feature gate: #![feature(const_result_traits)]
This is a tracking issue for constifying the methods of Result
that depend on const traits. (#143874)
Public API
impl<T, E> Result<T, E> {
const fn map<F, U>(self, f: F) -> Result<U, E> where F: [const] FnOnce(T) -> U + [const] Destruct;
const fn map<O, F>(self, op: O) -> Result<T, F> where O: [const] FnOnce(E) -> F + [const] Destruct;
const fn inspect<F>(self, f: F) -> Result<T, E> where F: [const] FnOnce(&T) + [const] Destruct;
const fn inspect_err<F>(self, f: F) -> Result<T, E> where F: [const] FnOnce(&E) + [const] Destruct;
const fn as_deref(&self) -> Result<&T::Target, &E> where T: [const] Deref;
const fn as_deref_mut(&mut self) -> Result<&mut T::Target, &mut E> where T: [const] DerefMut;
}
Steps / History
(Remember to update the S-tracking-*
label when checking boxes.)
- Implementation: TBD
- Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
- None yet.
Footnotes
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.