Skip to content

Commit 6227d42

Browse files
authored
Rollup merge of rust-lang#91091 - ecstatic-morse:control-flow-enum-is, r=m-ou-se
Stabilize `ControlFlow::{is_break, is_continue}` The type itself was stabilized in 1.55, but using it is not ergonomic without these helper functions. Stabilize them. r? rust-lang/libs-api
2 parents 42f8d48 + 7ba4acc commit 6227d42

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/core/src/ops/control_flow.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ impl<B, C> ControlFlow<B, C> {
141141
/// assert!(!ControlFlow::<String, i32>::Continue(3).is_break());
142142
/// ```
143143
#[inline]
144-
#[unstable(feature = "control_flow_enum", reason = "new API", issue = "75744")]
144+
#[stable(feature = "control_flow_enum_is", since = "1.59.0")]
145145
pub fn is_break(&self) -> bool {
146146
matches!(*self, ControlFlow::Break(_))
147147
}
@@ -158,7 +158,7 @@ impl<B, C> ControlFlow<B, C> {
158158
/// assert!(ControlFlow::<String, i32>::Continue(3).is_continue());
159159
/// ```
160160
#[inline]
161-
#[unstable(feature = "control_flow_enum", reason = "new API", issue = "75744")]
161+
#[stable(feature = "control_flow_enum_is", since = "1.59.0")]
162162
pub fn is_continue(&self) -> bool {
163163
matches!(*self, ControlFlow::Continue(_))
164164
}

0 commit comments

Comments
 (0)