Skip to content

Commit 5ce2803

Browse files
authored
Unrolled build for #146088
Rollup merge of #146088 - npmccallum:try, r=scottmcm constify impl Try for ControlFlow Related to: #74935
2 parents a2c8b0b + 6be2340 commit 5ce2803

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

library/core/src/ops/control_flow.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ pub enum ControlFlow<B, C = ()> {
9999
}
100100

101101
#[unstable(feature = "try_trait_v2", issue = "84277", old_name = "try_trait")]
102-
impl<B, C> ops::Try for ControlFlow<B, C> {
102+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
103+
impl<B, C> const ops::Try for ControlFlow<B, C> {
103104
type Output = C;
104105
type Residual = ControlFlow<B, convert::Infallible>;
105106

@@ -118,9 +119,10 @@ impl<B, C> ops::Try for ControlFlow<B, C> {
118119
}
119120

120121
#[unstable(feature = "try_trait_v2", issue = "84277", old_name = "try_trait")]
122+
#[rustc_const_unstable(feature = "const_try", issue = "74935")]
121123
// Note: manually specifying the residual type instead of using the default to work around
122124
// https://github.com/rust-lang/rust/issues/99940
123-
impl<B, C> ops::FromResidual<ControlFlow<B, convert::Infallible>> for ControlFlow<B, C> {
125+
impl<B, C> const ops::FromResidual<ControlFlow<B, convert::Infallible>> for ControlFlow<B, C> {
124126
#[inline]
125127
fn from_residual(residual: ControlFlow<B, convert::Infallible>) -> Self {
126128
match residual {

0 commit comments

Comments
 (0)