Unify normalization of terms in deeply normalize

This commit is contained in:
Michael Goulet
2025-06-06 18:05:29 +00:00
parent 7efd90a1a5
commit aa1b296dd6
4 changed files with 30 additions and 71 deletions

View File

@@ -39,10 +39,7 @@ impl<'tcx> At<'_, 'tcx> {
return Ok(term);
}
let new_infer = match term.kind() {
ty::TermKind::Ty(_) => self.infcx.next_ty_var(self.cause.span).into(),
ty::TermKind::Const(_) => self.infcx.next_const_var(self.cause.span).into(),
};
let new_infer = self.infcx.next_term_var_of_kind(term, self.cause.span);
// We simply emit an `alias-eq` goal here, since that will take care of
// normalizing the LHS of the projection until it is a rigid projection