diff options
| author | onestacked <chrisi.schrefl@gmail.com> | 2022-09-22 18:21:34 +0200 |
|---|---|---|
| committer | onestacked <chrisi.schrefl@gmail.com> | 2022-09-22 18:21:34 +0200 |
| commit | 5a5138df5940119744ba80b1d3ed29b1024b973d (patch) | |
| tree | ab136aec8352534fb624a90a92e4dc0f9be6d44f | |
| parent | 8ab71ab59fd17a1c51d23b68eced935b92431b70 (diff) | |
| download | rust-5a5138df5940119744ba80b1d3ed29b1024b973d.tar.gz rust-5a5138df5940119744ba80b1d3ed29b1024b973d.zip | |
Constify {FormResidual, Try} for ControlFlow
| -rw-r--r-- | library/core/src/ops/control_flow.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/library/core/src/ops/control_flow.rs b/library/core/src/ops/control_flow.rs index b1f5559dcfc..fd567a8c684 100644 --- a/library/core/src/ops/control_flow.rs +++ b/library/core/src/ops/control_flow.rs @@ -95,7 +95,8 @@ pub enum ControlFlow<B, C = ()> { } #[unstable(feature = "try_trait_v2", issue = "84277")] -impl<B, C> ops::Try for ControlFlow<B, C> { +#[rustc_const_unstable(feature = "const_convert", issue = "88674")] +impl<B, C> const ops::Try for ControlFlow<B, C> { type Output = C; type Residual = ControlFlow<B, convert::Infallible>; @@ -114,7 +115,8 @@ impl<B, C> ops::Try for ControlFlow<B, C> { } #[unstable(feature = "try_trait_v2", issue = "84277")] -impl<B, C> ops::FromResidual for ControlFlow<B, C> { +#[rustc_const_unstable(feature = "const_convert", issue = "88674")] +impl<B, C> const ops::FromResidual for ControlFlow<B, C> { #[inline] fn from_residual(residual: ControlFlow<B, convert::Infallible>) -> Self { match residual { |
