diff options
| author | bors <bors@rust-lang.org> | 2025-05-26 13:42:30 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-05-26 13:42:30 +0000 |
| commit | 9c0bcb514f49cd1e6a30affb2fe4cfca060129a2 (patch) | |
| tree | 48e6333e27cab94067b06921d7aec227929f442b /compiler/rustc_infer | |
| parent | b5eb9893f42a469d330046089539f908d4728384 (diff) | |
| parent | ade24354f4bc344db9b1647d949d97dec19bdd77 (diff) | |
Auto merge of #141442 - compiler-errors:fast-path-pred, r=lcnr
Fold predicate fast path in canonicalizer and eager resolver See individual commits. r? lcnr
Diffstat (limited to 'compiler/rustc_infer')
| -rw-r--r-- | compiler/rustc_infer/src/infer/canonical/canonicalizer.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_infer/src/infer/canonical/canonicalizer.rs b/compiler/rustc_infer/src/infer/canonical/canonicalizer.rs index 26ecaebe97f..0b543f091f7 100644 --- a/compiler/rustc_infer/src/infer/canonical/canonicalizer.rs +++ b/compiler/rustc_infer/src/infer/canonical/canonicalizer.rs @@ -493,6 +493,10 @@ impl<'cx, 'tcx> TypeFolder<TyCtxt<'tcx>> for Canonicalizer<'cx, 'tcx> { ct } } + + fn fold_predicate(&mut self, p: ty::Predicate<'tcx>) -> ty::Predicate<'tcx> { + if p.flags().intersects(self.needs_canonical_flags) { p.super_fold_with(self) } else { p } + } } impl<'cx, 'tcx> Canonicalizer<'cx, 'tcx> { |
