Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rust-lang/rust
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: compiler-errors/rust
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: folder-experiment-6
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Apr 2, 2025

  1. Copy the full SHA
    7d2c08f View commit details
Showing with 4 additions and 0 deletions.
  1. +4 −0 compiler/rustc_infer/src/infer/canonical/canonicalizer.rs
4 changes: 4 additions & 0 deletions compiler/rustc_infer/src/infer/canonical/canonicalizer.rs
Original file line number Diff line number Diff line change
@@ -515,6 +515,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> {