fn collect_items_rec<'tcx>(
    tcx: TyCtxt<'tcx>,
    starting_item: Spanned<MonoItem<'tcx>>,
    state: &SharedState<'tcx>,
    recursion_depths: &mut DefIdMap<usize>,
    recursion_limit: Limit,
    mode: CollectionMode,
)Expand description
Collect all monomorphized items reachable from starting_point, and emit a note diagnostic if a
post-monomorphization error is encountered during a collection step.
mode determined whether we are scanning for used items
or mentioned items.