Skip to content

Commit db3abec

Browse files
authored
Rollup merge of rust-lang#129086 - slanterns:is_none_or, r=dtolnay
Stabilize `is_none_or` Closes: rust-lang#126383. `@rustbot` label: +T-libs-api r? libs-api
2 parents 9704e2d + 9858d49 commit db3abec

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Diff for: core/src/option.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -656,8 +656,6 @@ impl<T> Option<T> {
656656
/// # Examples
657657
///
658658
/// ```
659-
/// #![feature(is_none_or)]
660-
///
661659
/// let x: Option<u32> = Some(2);
662660
/// assert_eq!(x.is_none_or(|x| x > 1), true);
663661
///
@@ -669,7 +667,7 @@ impl<T> Option<T> {
669667
/// ```
670668
#[must_use]
671669
#[inline]
672-
#[unstable(feature = "is_none_or", issue = "126383")]
670+
#[stable(feature = "is_none_or", since = "CURRENT_RUSTC_VERSION")]
673671
pub fn is_none_or(self, f: impl FnOnce(T) -> bool) -> bool {
674672
match self {
675673
None => true,

0 commit comments

Comments
 (0)