Skip to content

Commit 5a5138d

Browse files
committed
Constify {FormResidual, Try} for ControlFlow
1 parent 8ab71ab commit 5a5138d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

library/core/src/ops/control_flow.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ pub enum ControlFlow<B, C = ()> {
9595
}
9696

9797
#[unstable(feature = "try_trait_v2", issue = "84277")]
98-
impl<B, C> ops::Try for ControlFlow<B, C> {
98+
#[rustc_const_unstable(feature = "const_convert", issue = "88674")]
99+
impl<B, C> const ops::Try for ControlFlow<B, C> {
99100
type Output = C;
100101
type Residual = ControlFlow<B, convert::Infallible>;
101102

@@ -114,7 +115,8 @@ impl<B, C> ops::Try for ControlFlow<B, C> {
114115
}
115116

116117
#[unstable(feature = "try_trait_v2", issue = "84277")]
117-
impl<B, C> ops::FromResidual for ControlFlow<B, C> {
118+
#[rustc_const_unstable(feature = "const_convert", issue = "88674")]
119+
impl<B, C> const ops::FromResidual for ControlFlow<B, C> {
118120
#[inline]
119121
fn from_residual(residual: ControlFlow<B, convert::Infallible>) -> Self {
120122
match residual {

0 commit comments

Comments
 (0)