Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/test_utils/src/minicore.rs')
| -rw-r--r-- | crates/test_utils/src/minicore.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/crates/test_utils/src/minicore.rs b/crates/test_utils/src/minicore.rs index 5e17047a40..045b4898e5 100644 --- a/crates/test_utils/src/minicore.rs +++ b/crates/test_utils/src/minicore.rs @@ -300,6 +300,17 @@ pub mod ops { #[lang = "branch"] fn branch(self) -> ControlFlow<Self::Residual, Self::Output>; } + + impl<B, C> Try for ControlFlow<B, C> { + type Output = C; + type Residual = ControlFlow<B, convert::Infallible>; + fn from_output(output: Self::Output) -> Self {} + fn branch(self) -> ControlFlow<Self::Residual, Self::Output> {} + } + + impl<B, C> FromResidual for ControlFlow<B, C> { + fn from_residual(residual: ControlFlow<B, convert::Infallible>) -> Self {} + } } pub use self::try_::{ControlFlow, FromResidual, Try}; // endregion:try |