Skip to content

Commit 84666af

Browse files
committed
Constify Residual behind const_try
1 parent d78bc41 commit 84666af

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

library/core/src/ops/control_flow.rs

+1
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ impl<B, C> const ops::FromResidual for ControlFlow<B, C> {
126126
}
127127

128128
#[unstable(feature = "try_trait_v2_residual", issue = "91285")]
129+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
129130
impl<B, C> const ops::Residual<C> for ControlFlow<B, convert::Infallible> {
130131
type TryType = ControlFlow<B, C>;
131132
}

library/core/src/option.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -2321,7 +2321,8 @@ impl<T> ops::FromResidual<ops::Yeet<()>> for Option<T> {
23212321
}
23222322

23232323
#[unstable(feature = "try_trait_v2_residual", issue = "91285")]
2324-
impl<T> ops::Residual<T> for Option<convert::Infallible> {
2324+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
2325+
impl<T> const ops::Residual<T> for Option<convert::Infallible> {
23252326
type TryType = Option<T>;
23262327
}
23272328

library/core/src/result.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -2116,6 +2116,7 @@ impl<T, E, F: From<E>> ops::FromResidual<ops::Yeet<E>> for Result<T, F> {
21162116
}
21172117

21182118
#[unstable(feature = "try_trait_v2_residual", issue = "91285")]
2119-
impl<T, E> ops::Residual<T> for Result<convert::Infallible, E> {
2119+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
2120+
impl<T, E> const ops::Residual<T> for Result<convert::Infallible, E> {
21202121
type TryType = Result<T, E>;
21212122
}

0 commit comments

Comments
 (0)