Change feature name to is_some_and

This commit is contained in:
Cameron Steffen 2022-06-23 13:17:42 -05:00
parent 2f83134e37
commit 4f12de0660
7 changed files with 11 additions and 11 deletions

View file

@ -7,7 +7,7 @@
#![feature(box_patterns)]
#![feature(decl_macro)]
#![feature(if_let_guard)]
#![feature(is_some_with)]
#![feature(is_some_and)]
#![feature(is_sorted)]
#![feature(let_chains)]
#![feature(proc_macro_internals)]

View file

@ -20,7 +20,7 @@ Rust MIR: a lowered representation of Rust.
#![feature(trusted_step)]
#![feature(try_blocks)]
#![feature(yeet_expr)]
#![feature(is_some_with)]
#![feature(is_some_and)]
#![recursion_limit = "256"]
#![allow(rustc::potential_query_instability)]

View file

@ -70,7 +70,7 @@ This API is completely unstable and subject to change.
#![feature(once_cell)]
#![feature(slice_partition_dedup)]
#![feature(try_blocks)]
#![feature(is_some_with)]
#![feature(is_some_and)]
#![feature(type_alias_impl_trait)]
#![recursion_limit = "256"]

View file

@ -559,7 +559,7 @@ impl<T> Option<T> {
/// # Examples
///
/// ```
/// #![feature(is_some_with)]
/// #![feature(is_some_and)]
///
/// let x: Option<u32> = Some(2);
/// assert_eq!(x.is_some_and(|x| x > 1), true);
@ -572,7 +572,7 @@ impl<T> Option<T> {
/// ```
#[must_use]
#[inline]
#[unstable(feature = "is_some_with", issue = "93050")]
#[unstable(feature = "is_some_and", issue = "93050")]
pub fn is_some_and(self, f: impl FnOnce(T) -> bool) -> bool {
match self {
None => false,

View file

@ -548,7 +548,7 @@ impl<T, E> Result<T, E> {
/// # Examples
///
/// ```
/// #![feature(is_some_with)]
/// #![feature(is_some_and)]
///
/// let x: Result<u32, &str> = Ok(2);
/// assert_eq!(x.is_ok_and(|x| x > 1), true);
@ -561,7 +561,7 @@ impl<T, E> Result<T, E> {
/// ```
#[must_use]
#[inline]
#[unstable(feature = "is_some_with", issue = "93050")]
#[unstable(feature = "is_some_and", issue = "93050")]
pub fn is_ok_and(self, f: impl FnOnce(T) -> bool) -> bool {
match self {
Err(_) => false,
@ -595,7 +595,7 @@ impl<T, E> Result<T, E> {
/// # Examples
///
/// ```
/// #![feature(is_some_with)]
/// #![feature(is_some_and)]
/// use std::io::{Error, ErrorKind};
///
/// let x: Result<u32, Error> = Err(Error::new(ErrorKind::NotFound, "!"));
@ -609,7 +609,7 @@ impl<T, E> Result<T, E> {
/// ```
#[must_use]
#[inline]
#[unstable(feature = "is_some_with", issue = "93050")]
#[unstable(feature = "is_some_and", issue = "93050")]
pub fn is_err_and(self, f: impl FnOnce(E) -> bool) -> bool {
match self {
Ok(_) => false,

View file

@ -291,7 +291,7 @@
#![feature(hasher_prefixfree_extras)]
#![feature(hashmap_internals)]
#![feature(int_error_internals)]
#![feature(is_some_with)]
#![feature(is_some_and)]
#![feature(maybe_uninit_slice)]
#![feature(maybe_uninit_write_slice)]
#![feature(nonnull_slice_from_raw_parts)]

View file

@ -7,7 +7,7 @@
#![feature(int_log)]
#![feature(variant_count)]
#![feature(yeet_expr)]
#![feature(is_some_with)]
#![feature(is_some_and)]
#![feature(nonzero_ops)]
#![feature(local_key_cell_methods)]
#![cfg_attr(bootstrap, feature(let_else))]