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

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.