diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2021-12-13 00:20:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-13 00:20:07 +0100 |
| commit | 6227d42928b0caef4ebb258df7247c1f85fb9e83 (patch) | |
| tree | c42ac1cb8888e5593445b76e2bc38d4d98919b9d | |
| parent | 42f8d4833f21030fa3dff509a2559dfcb5d5ed72 (diff) | |
| parent | 7ba4accfbf6278a5ca960c7a1d280df898ebfdb2 (diff) | |
| download | rust-6227d42928b0caef4ebb258df7247c1f85fb9e83.tar.gz rust-6227d42928b0caef4ebb258df7247c1f85fb9e83.zip | |
Rollup merge of #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
| -rw-r--r-- | library/core/src/ops/control_flow.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/core/src/ops/control_flow.rs b/library/core/src/ops/control_flow.rs index 5ee8e377de1..10a24a545d3 100644 --- a/library/core/src/ops/control_flow.rs +++ b/library/core/src/ops/control_flow.rs @@ -141,7 +141,7 @@ impl<B, C> ControlFlow<B, C> { /// assert!(!ControlFlow::<String, i32>::Continue(3).is_break()); /// ``` #[inline] - #[unstable(feature = "control_flow_enum", reason = "new API", issue = "75744")] + #[stable(feature = "control_flow_enum_is", since = "1.59.0")] pub fn is_break(&self) -> bool { matches!(*self, ControlFlow::Break(_)) } @@ -158,7 +158,7 @@ impl<B, C> ControlFlow<B, C> { /// assert!(ControlFlow::<String, i32>::Continue(3).is_continue()); /// ``` #[inline] - #[unstable(feature = "control_flow_enum", reason = "new API", issue = "75744")] + #[stable(feature = "control_flow_enum_is", since = "1.59.0")] pub fn is_continue(&self) -> bool { matches!(*self, ControlFlow::Continue(_)) } |
