rustc_monomorphize::collector

Function collect_items_of_instance

Source
fn collect_items_of_instance<'tcx>(
    tcx: TyCtxt<'tcx>,
    instance: Instance<'tcx>,
    used_items: &mut Vec<Spanned<MonoItem<'tcx>>>,
    mentioned_items: &mut Vec<Spanned<MonoItem<'tcx>>>,
    mode: CollectionMode,
)
Expand description

Scans the MIR in order to find function calls, closures, and drop-glue.

Anything that’s found is added to output. Furthermore the “mentioned items” of the MIR are returned.