-
Couldn't load subscription status.
- Fork 13.9k
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 RFCF-try_trait_v2Tracking issue for RFC#3058Tracking issue for RFC#3058T-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(try_trait_v2_residual)]
This is a tracking issue for the ops::Residual trait.
This is used by try_* APIs that need to change from one member of a family to another, such as
- https://doc.rust-lang.org/nightly/std/array/fn.try_from_fn.html Tracking issue for
try_array_from_fn#89379 - https://doc.rust-lang.org/nightly/std/iter/trait.Iterator.html#method.try_find Tracking Issue for Iterator::try_find #63178
- https://doc.rust-lang.org/nightly/std/primitive.array.html#method.try_map Tracking issue for
array::try_map#79711
For example, the closure passed to Iterator::try_find returns Foo<bool>, but the method wants to be able to return Foo<Option<<Self as Iterator>::Item>>.
Public API
// ops::Residual
trait Residual<O> {
type TryTrait: Try<Output = O, Residual = Self>;
}
// with implementations for `Result`, `Option`, and `ControlFlow`.Steps / History
- Implementation: Make
array::{try_from_fn, try_map}andIterator::try_findgeneric overTry#91286 - Final comment period (FCP)
- Stabilization PR
Unresolved Questions
- If
Try::Residualis renamed (an open question in Tracking Issue fortry_trait_v2, A new design for the?desugaring (RFC#3058) #84277), this this probably should be too.
leighmcculloch, TheNullicorn, dzmitry-lahoda, SergioRibera, jpramosi and 3 moreBGR360 and dzmitry-lahoda
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 RFCF-try_trait_v2Tracking issue for RFC#3058Tracking issue for RFC#3058T-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.