Skip to main content

instance_def_id

Function instance_def_id 

Source
pub(crate) fn instance_def_id<'tcx>(
    tcx: TyCtxt<'tcx>,
    instance: Instance<'tcx>,
) -> (Option<DefId>, bool)
Expand description

Map a resolved [Instance] to its concrete target DefId and whether the dispatch is virtual. None for kinds with no single target (e.g. a closure’s Clone shim).