Skip to content

Commit

Permalink
Unrolled build for rust-lang#129086
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rust-timer authored Aug 16, 2024
2 parents 569d7e3 + 14ac0a3 commit 2e5df4e
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 7 deletions.
1 change: 0 additions & 1 deletion compiler/rustc_const_eval/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_hir_typeck/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
4 changes: 1 addition & 3 deletions library/core/src/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
///
Expand All @@ -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,
Expand Down
1 change: 0 additions & 1 deletion src/tools/miri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/tools/rust-analyzer/crates/hir-ty/src/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1462,7 +1462,7 @@ fn generic_args_sans_defaults<'ga>(
// otherwise, if the arg is equal to the param default, hide it (unless the
// default is an error which can happen for the trait Self type)
#[allow(unstable_name_collisions)]
default_parameters.get(i).is_none_or(|default_parameter| {
IsNoneOr::is_none_or(default_parameters.get(i), |default_parameter| {
// !is_err(default_parameter.skip_binders())
// &&
arg != &default_parameter.clone().substitute(Interner, &parameters)
Expand Down

0 comments on commit 2e5df4e

Please sign in to comment.