Skip to content

Commit 9541ce1

Browse files
authored
Rollup merge of rust-lang#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.
2 parents 85aec92 + d4914a7 commit 9541ce1

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_next_trait_solver/src/solve/eval_ctxt

1 file changed

+1
-1
lines changed

Diff for: compiler/rustc_next_trait_solver/src/solve/eval_ctxt/canonical.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ where
142142
// Remove any trivial region constraints once we've resolved regions
143143
external_constraints
144144
.region_constraints
145-
.retain(|outlives| outlives.0.as_region().map_or(true, |re| re != outlives.1));
145+
.retain(|outlives| outlives.0.as_region().is_none_or(|re| re != outlives.1));
146146

147147
let canonical = Canonicalizer::canonicalize_response(
148148
self.delegate,

0 commit comments

Comments
 (0)