[−][src]Function rustc_codegen_llvm::meth::get_vtable
pub fn get_vtable<'ll, 'tcx>(
cx: &CodegenCx<'ll, 'tcx>,
ty: Ty<'tcx>,
trait_ref: Option<PolyExistentialTraitRef<'tcx>>
) -> &'ll Value
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Creates a dynamic vtable for the given type and vtable origin. This is used only for objects.
The vtables are cached instead of created on every call.
The trait_ref
encodes the erased self type. Hence if we are
making an object Foo<Trait>
from a value of type Foo<T>
, then
trait_ref
would map T:Trait
.