From 683e0cbdbb62a6fc416dc8c5ecf6da1391eea92a Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Mon, 2 May 2022 01:12:35 -0700 Subject: [PATCH] Stabilize `bool::then_some` --- core/src/bool.rs | 4 +--- core/tests/lib.rs | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/core/src/bool.rs b/core/src/bool.rs index 36000f8f3..f7a8aa0d9 100644 --- a/core/src/bool.rs +++ b/core/src/bool.rs @@ -9,12 +9,10 @@ impl bool { /// # Examples /// /// ``` - /// #![feature(bool_to_option)] - /// /// assert_eq!(false.then_some(0), None); /// assert_eq!(true.then_some(0), Some(0)); /// ``` - #[unstable(feature = "bool_to_option", issue = "80967")] + #[stable(feature = "bool_to_option", since = "1.62.0")] #[rustc_const_unstable(feature = "const_bool_to_option", issue = "91917")] #[inline] pub const fn then_some(self, t: T) -> Option diff --git a/core/tests/lib.rs b/core/tests/lib.rs index 485fa305c..21d600ac5 100644 --- a/core/tests/lib.rs +++ b/core/tests/lib.rs @@ -3,7 +3,6 @@ #![feature(array_methods)] #![feature(array_windows)] #![feature(bench_black_box)] -#![feature(bool_to_option)] #![feature(box_syntax)] #![feature(cell_update)] #![feature(const_assume)]