Function rustc_trait_selection::traits::vtable::count_own_vtable_entries
source · pub(crate) fn count_own_vtable_entries<'tcx>(
tcx: TyCtxt<'tcx>,
trait_ref: PolyTraitRef<'tcx>
) -> usize
Expand description
Given a trait trait_ref
, returns the number of vtable entries
that come from trait_ref
, excluding its supertraits. Used in
computing the vtable base for an upcast trait of a trait object.