1
Fork 0

fix var equality issue with old canonicalizer

This commit is contained in:
Michael Goulet 2023-03-07 17:25:45 +00:00
parent 8d13454498
commit 3bfcfd079d
2 changed files with 22 additions and 5 deletions

View file

@ -267,7 +267,6 @@ impl<'tcx> TypeFolder<TyCtxt<'tcx>> for Canonicalizer<'_, 'tcx> {
// We need to canonicalize the *root* of our ty var.
// This is so that our canonical response correctly reflects
// any equated inference vars correctly!
let root_vid = self.infcx.root_var(vid);
if root_vid != vid {
t = self.infcx.tcx.mk_ty_var(root_vid);