1
Fork 0

Add comment and more tests.

This commit is contained in:
Charles Lew 2021-07-22 23:29:53 +08:00
parent 634638782b
commit fbb353ae2b
5 changed files with 390 additions and 0 deletions

View file

@ -7,11 +7,17 @@ use rustc_ast::Mutability;
#[derive(Clone, Copy, PartialEq, HashStable)]
pub enum VtblEntry<'tcx> {
/// destructor of this type (used in vtable header)
MetadataDropInPlace,
/// layout size of this type (used in vtable header)
MetadataSize,
/// layout align of this type (used in vtable header)
MetadataAlign,
/// non-dispatchable associated function that is excluded from trait object
Vacant,
/// dispatchable associated function
Method(Instance<'tcx>),
/// pointer to a separate supertrait vtable, can be used by trait upcasting coercion
TraitVPtr(PolyTraitRef<'tcx>),
}