Track bound types like bound regions

This commit is contained in:
Michael Goulet
2023-01-17 03:27:48 +00:00
parent a322848c6b
commit 0e98a162c8
13 changed files with 52 additions and 38 deletions

View File

@@ -610,7 +610,9 @@ impl<'tcx> TyCtxt<'tcx> {
let index = entry.index();
let var = ty::BoundVar::from_usize(index);
let kind = entry
.or_insert_with(|| ty::BoundVariableKind::Ty(ty::BoundTyKind::Anon))
.or_insert_with(|| {
ty::BoundVariableKind::Ty(ty::BoundTyKind::Anon(index as u32))
})
.expect_ty();
self.tcx.mk_ty(ty::Bound(ty::INNERMOST, BoundTy { var, kind }))
}