about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2025-02-07 18:26:29 +0100
committerGitHub <noreply@github.com>2025-02-07 18:26:29 +0100
commitb4c4913abbbd0d050d6fb4abd323c1065fe6dc41 (patch)
treedd52a558529c0170e5d6dc6ce1ffe28afeb58694 /compiler
parent7c0dff877fde7d6a98bb05b05a59fc5ae03672d4 (diff)
parentd4914a7719cf19e3851df65f54d8a495a6f0027d (diff)
downloadrust-b4c4913abbbd0d050d6fb4abd323c1065fe6dc41.tar.gz
rust-b4c4913abbbd0d050d6fb4abd323c1065fe6dc41.zip
Rollup merge of #136664 - WaffleLapkin:un-map_or-true, r=compiler-errors
replace one `.map_or(true, ...)` with `.is_none_or(...)`

Randomly found while going through some of my old branches.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_next_trait_solver/src/solve/eval_ctxt/canonical.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/canonical.rs b/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/canonical.rs
index a0d41110d96..0bfd72c6848 100644
--- a/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/canonical.rs
+++ b/compiler/rustc_next_trait_solver/src/solve/eval_ctxt/canonical.rs
@@ -142,7 +142,7 @@ where
         // Remove any trivial region constraints once we've resolved regions
         external_constraints
             .region_constraints
-            .retain(|outlives| outlives.0.as_region().map_or(true, |re| re != outlives.1));
+            .retain(|outlives| outlives.0.as_region().is_none_or(|re| re != outlives.1));
 
         let canonical = Canonicalizer::canonicalize_response(
             self.delegate,