Tracking Issue for ops::Residual (feature try_trait_v2_residual) (original) (raw)

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

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 { type TryTrait: Try<Output = O, Residual = Self>; }

// with implementations for Result, Option, and ControlFlow.

Steps / History

Unresolved Questions