Skip to content

Commit d777ccc

Browse files
authored
Rollup merge of #96628 - joshtriplett:stabilize-then-some, r=m-ou-se
Stabilize `bool::then_some` FCP completed in rust-lang/rust#80967
2 parents 266e7e9 + 683e0cb commit d777ccc

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

core/src/bool.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@ impl bool {
99
/// # Examples
1010
///
1111
/// ```
12-
/// #![feature(bool_to_option)]
13-
///
1412
/// assert_eq!(false.then_some(0), None);
1513
/// assert_eq!(true.then_some(0), Some(0));
1614
/// ```
17-
#[unstable(feature = "bool_to_option", issue = "80967")]
15+
#[stable(feature = "bool_to_option", since = "1.62.0")]
1816
#[rustc_const_unstable(feature = "const_bool_to_option", issue = "91917")]
1917
#[inline]
2018
pub const fn then_some<T>(self, t: T) -> Option<T>

core/tests/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#![feature(array_methods)]
44
#![feature(array_windows)]
55
#![feature(bench_black_box)]
6-
#![feature(bool_to_option)]
76
#![feature(box_syntax)]
87
#![feature(cell_update)]
98
#![feature(const_assume)]

0 commit comments

Comments
 (0)