Store the laziness of type aliases in the DefKind

This commit is contained in:
León Orell Valerian Liehr
2023-08-06 23:02:27 +02:00
parent 34ccd04859
commit 5468336d6b
49 changed files with 208 additions and 93 deletions

View File

@@ -728,7 +728,7 @@ fn check_item_type(tcx: TyCtxt<'_>, id: hir::ItemId) {
check_opaque(tcx, id);
}
}
DefKind::TyAlias => {
DefKind::TyAlias { .. } => {
let pty_ty = tcx.type_of(id.owner_id).instantiate_identity();
let generics = tcx.generics_of(id.owner_id);
check_type_params_are_used(tcx, &generics, pty_ty);