pub fn compute_debuginfo_vtable_name<'tcx>(
    tcx: TyCtxt<'tcx>,
    t: Ty<'tcx>,
    trait_ref: Option<PolyExistentialTraitRef<'tcx>>,
    kind: VTableNameKind
) -> String
Expand description

Computes a name for the global variable storing a vtable (or the type of that global variable).

The name is of the form:

<path::to::SomeType as path::to::SomeTrait>::{vtable}

or, when generating C++-like names:

impl$<path::to::SomeType, path::to::SomeTrait>::vtable$

If kind is VTableNameKind::Type then the last component is {vtable_ty} instead of just {vtable}, so that the type and the corresponding global variable get assigned different names.