Don't ICE when non-self part of trait goal is constrained in new solver

This commit is contained in:
Michael Goulet 2024-03-10 22:32:55 -04:00
parent 6554a5645a
commit 2a1d4dd6e3
3 changed files with 38 additions and 1 deletions

View file

@ -274,7 +274,9 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
let goal =
goal.with(self.tcx(), goal.predicate.with_self_ty(self.tcx(), normalized_self_ty));
debug_assert_eq!(goal, self.resolve_vars_if_possible(goal));
// Vars that show up in the rest of the goal substs may have been constrained by
// normalizing the self type as well, since type variables are not uniquified.
let goal = self.resolve_vars_if_possible(goal);
let mut candidates = vec![];