diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2025-02-07 18:26:29 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-07 18:26:29 +0100 |
| commit | b4c4913abbbd0d050d6fb4abd323c1065fe6dc41 (patch) | |
| tree | dd52a558529c0170e5d6dc6ce1ffe28afeb58694 /compiler | |
| parent | 7c0dff877fde7d6a98bb05b05a59fc5ae03672d4 (diff) | |
| parent | d4914a7719cf19e3851df65f54d8a495a6f0027d (diff) | |
| download | rust-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.rs | 2 |
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, |
