rustc_middle::util::find_self_call

Function find_self_call

Source
pub fn find_self_call<'tcx>(
    tcx: TyCtxt<'tcx>,
    body: &Body<'tcx>,
    local: Local,
    block: BasicBlock,
) -> Option<(DefId, GenericArgsRef<'tcx>)>
Expand description

Checks if the specified local is used as the self parameter of a method call in the provided BasicBlock. If it is, then the DefId of the called method is returned.