Initial fixes on top of type interner commit

This commit is contained in:
Michael Goulet
2022-05-22 12:57:46 -07:00
parent a7015fe816
commit a056a953f0
28 changed files with 171 additions and 134 deletions

View File

@@ -36,8 +36,9 @@ impl<'tcx> fmt::Debug for VtblEntry<'tcx> {
}
}
pub const COMMON_VTABLE_ENTRIES: &[VtblEntry<'_>] =
&[VtblEntry::MetadataDropInPlace, VtblEntry::MetadataSize, VtblEntry::MetadataAlign];
pub const fn common_vtable_entries<'tcx>() -> &'tcx [VtblEntry<'tcx>] {
&[VtblEntry::MetadataDropInPlace, VtblEntry::MetadataSize, VtblEntry::MetadataAlign]
}
pub const COMMON_VTABLE_ENTRIES_DROPINPLACE: usize = 0;
pub const COMMON_VTABLE_ENTRIES_SIZE: usize = 1;
@@ -57,7 +58,7 @@ pub(super) fn vtable_allocation_provider<'tcx>(
tcx.vtable_entries(trait_ref)
} else {
COMMON_VTABLE_ENTRIES
common_vtable_entries()
};
let layout = tcx