From fbb353ae2b5cef75c7d97be4f3c2283a63e0fd7f Mon Sep 17 00:00:00 2001 From: Charles Lew Date: Thu, 22 Jul 2021 23:29:53 +0800 Subject: Add comment and more tests. --- compiler/rustc_middle/src/ty/vtable.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'compiler') diff --git a/compiler/rustc_middle/src/ty/vtable.rs b/compiler/rustc_middle/src/ty/vtable.rs index cc3f6b3d6ec..5904f133e78 100644 --- a/compiler/rustc_middle/src/ty/vtable.rs +++ b/compiler/rustc_middle/src/ty/vtable.rs @@ -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>), } -- cgit 1.4.1-3-g733a5