about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWaffle Lapkin <waffle.lapkin@gmail.com>2025-02-06 23:12:33 +0100
committerWaffle Lapkin <waffle.lapkin@gmail.com>2025-02-06 23:15:41 +0100
commitd4914a7719cf19e3851df65f54d8a495a6f0027d (patch)
tree44cbd25a4aa89bd1582c2ef4356b4b89ef3d8ebf
parent942db6782f4a28c55b0b75b38fd4394d0483390f (diff)
replace one `.map_or(true, ...)` with `.is_none_or(...)`
-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 39e365806cb..4cb8fcfee0a 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,