diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-03-12 06:29:04 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-12 06:29:04 +0100 |
| commit | cd2efff518699602b728678edfdf30506390640d (patch) | |
| tree | ed997f4081c51fa36f43d0cdb2997693d1f6091e /compiler/rustc_trait_selection/src/solve | |
| parent | 0b127d82f3ec897996248c62589a8bcb827a4b53 (diff) | |
| parent | 0b6b3307fcd9faef6d32d09c5674795600e95a35 (diff) | |
Rollup merge of #122319 - compiler-errors:next-solver-normalizing-self-constrains-args, r=lcnr
Don't ICE when non-self part of trait goal is constrained in new solver Self-explanatory. See test for example when this can happen.
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![]; |
