From 5a5138df5940119744ba80b1d3ed29b1024b973d Mon Sep 17 00:00:00 2001 From: onestacked Date: Thu, 22 Sep 2022 18:21:34 +0200 Subject: [PATCH] Constify {FormResidual, Try} for ControlFlow --- library/core/src/ops/control_flow.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/library/core/src/ops/control_flow.rs b/library/core/src/ops/control_flow.rs index b1f5559dcfc17..fd567a8c68492 100644 --- a/library/core/src/ops/control_flow.rs +++ b/library/core/src/ops/control_flow.rs @@ -95,7 +95,8 @@ pub enum ControlFlow { } #[unstable(feature = "try_trait_v2", issue = "84277")] -impl ops::Try for ControlFlow { +#[rustc_const_unstable(feature = "const_convert", issue = "88674")] +impl const ops::Try for ControlFlow { type Output = C; type Residual = ControlFlow; @@ -114,7 +115,8 @@ impl ops::Try for ControlFlow { } #[unstable(feature = "try_trait_v2", issue = "84277")] -impl ops::FromResidual for ControlFlow { +#[rustc_const_unstable(feature = "const_convert", issue = "88674")] +impl const ops::FromResidual for ControlFlow { #[inline] fn from_residual(residual: ControlFlow) -> Self { match residual {