about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-08-16 19:58:58 +0200
committerGitHub <noreply@github.com>2024-08-16 19:58:58 +0200
commit9d57e46f81ad82a729913f240bbaaf3aba94b2c7 (patch)
tree60d17c761143a61dec2162e9fabc8c08081372ca /src
parentf04d25fa91103a885d124e6e8384d92358847e0c (diff)
parent14ac0a38db036fbe3620534ee1c142f7092364e5 (diff)
downloadrust-9d57e46f81ad82a729913f240bbaaf3aba94b2c7.tar.gz
rust-9d57e46f81ad82a729913f240bbaaf3aba94b2c7.zip
Rollup merge of #129086 - slanterns:is_none_or, r=dtolnay
Stabilize `is_none_or`

Closes: https://github.com/rust-lang/rust/issues/126383.

`@rustbot` label: +T-libs-api

r? libs-api
Diffstat (limited to 'src')
-rw-r--r--src/tools/miri/src/lib.rs1
-rw-r--r--src/tools/rust-analyzer/crates/hir-ty/src/display.rs2
2 files changed, 1 insertions, 2 deletions
diff --git a/src/tools/miri/src/lib.rs b/src/tools/miri/src/lib.rs
index 966d38508f6..7a11e353f9d 100644
--- a/src/tools/miri/src/lib.rs
+++ b/src/tools/miri/src/lib.rs
@@ -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,
diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/display.rs b/src/tools/rust-analyzer/crates/hir-ty/src/display.rs
index 7c481958d1a..f406666ae5a 100644
--- a/src/tools/rust-analyzer/crates/hir-ty/src/display.rs
+++ b/src/tools/rust-analyzer/crates/hir-ty/src/display.rs
@@ -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)