Skip to content

Commit d14b648

Browse files
shallow-resolve normalization candidates
1 parent a54ce9a commit d14b648

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

compiler/rustc_trait_selection/src/solve/assembly.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,10 @@ impl<'a, 'tcx, G: GoalKind<'tcx>> AssemblyCtxt<'a, 'tcx, G> {
157157

158158
// NOTE: Alternatively we could call `evaluate_goal` here and only have a `Normalized` candidate.
159159
// This doesn't work as long as we use `CandidateSource` in both winnowing and to resolve associated items.
160-
let goal = goal.with(tcx, goal.predicate.with_self_ty(tcx, normalized_ty));
160+
let goal = goal.with(
161+
tcx,
162+
goal.predicate.with_self_ty(tcx, self.infcx.shallow_resolve(normalized_ty)),
163+
);
161164
let mut orig_values = OriginalQueryValues::default();
162165
let goal = self.infcx.canonicalize_query(goal, &mut orig_values);
163166
let normalized_candidates =

0 commit comments

Comments
 (0)