mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
stabilize is_none_or
This commit is contained in:
parent
9859bf27fd
commit
e2ec11502d
@ -6,7 +6,6 @@
|
||||
#![feature(box_patterns)]
|
||||
#![feature(decl_macro)]
|
||||
#![feature(if_let_guard)]
|
||||
#![feature(is_none_or)]
|
||||
#![feature(let_chains)]
|
||||
#![feature(never_type)]
|
||||
#![feature(rustdoc_internals)]
|
||||
|
@ -5,7 +5,6 @@
|
||||
#![feature(box_patterns)]
|
||||
#![feature(control_flow_enum)]
|
||||
#![feature(if_let_guard)]
|
||||
#![feature(is_none_or)]
|
||||
#![feature(let_chains)]
|
||||
#![feature(never_type)]
|
||||
#![feature(try_blocks)]
|
||||
|
@ -656,8 +656,6 @@ impl<T> Option<T> {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(is_none_or)]
|
||||
///
|
||||
/// let x: Option<u32> = Some(2);
|
||||
/// assert_eq!(x.is_none_or(|x| x > 1), true);
|
||||
///
|
||||
@ -669,7 +667,7 @@ impl<T> Option<T> {
|
||||
/// ```
|
||||
#[must_use]
|
||||
#[inline]
|
||||
#[unstable(feature = "is_none_or", issue = "126383")]
|
||||
#[stable(feature = "is_none_or", since = "CURRENT_RUSTC_VERSION")]
|
||||
pub fn is_none_or(self, f: impl FnOnce(T) -> bool) -> bool {
|
||||
match self {
|
||||
None => true,
|
||||
|
@ -12,7 +12,6 @@
|
||||
#![feature(let_chains)]
|
||||
#![feature(trait_upcasting)]
|
||||
#![feature(strict_overflow_ops)]
|
||||
#![feature(is_none_or)]
|
||||
// Configure clippy and other lints
|
||||
#![allow(
|
||||
clippy::collapsible_else_if,
|
||||
|
Loading…
Reference in New Issue
Block a user