[][src]Function rustc_mir::borrow_check::path_utils::is_upvar_field_projection

pub(crate) fn is_upvar_field_projection<'tcx>(
    tcx: TyCtxt<'tcx>,
    upvars: &[Upvar],
    place_ref: PlaceRef<'tcx>,
    body: &Body<'tcx>
) -> Option<Field>

If place is a field projection, and the field is being projected from a closure type, then returns the index of the field being projected. Note that this closure will always be self in the current MIR, because that is the only time we directly access the fields of a closure type.