diff options
| author | Michael Goulet <michael@errs.io> | 2024-03-10 22:32:55 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-03-11 19:16:39 +0000 |
| commit | 2a1d4dd6e3204e24467143d228107058032b2962 (patch) | |
| tree | f5394f29e42a4d9aa9beda2c122ba50b5fd7a00f /compiler/rustc_trait_selection/src/solve | |
| parent | 6554a5645a13e4d9331fd028960d69be91d7492d (diff) | |
Don't ICE when non-self part of trait goal is constrained in new solver
Diffstat (limited to 'compiler/rustc_trait_selection/src/solve')
| -rw-r--r-- | compiler/rustc_trait_selection/src/solve/assembly/mod.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_trait_selection/src/solve/assembly/mod.rs b/compiler/rustc_trait_selection/src/solve/assembly/mod.rs index 3be53a6591d..9c7fa5216d7 100644 --- a/compiler/rustc_trait_selection/src/solve/assembly/mod.rs +++ b/compiler/rustc_trait_selection/src/solve/assembly/mod.rs @@ -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![]; |
