Function rustc_mir_build::build::expr::as_place::strip_prefix
source · fn strip_prefix<'a, 'tcx>(
base_ty: Ty<'tcx>,
projections: &'a [UpvarProjectionElem<'tcx>],
prefix_projections: &[HirProjection<'tcx>]
) -> impl Iterator<Item = UpvarProjectionElem<'tcx>> + 'a
Expand description
Returns projections remaining after stripping an initial prefix of HIR projections.
Supports only HIR projection kinds that represent a path that might be
captured by a closure or a generator, i.e., an Index
or a Subslice
projection kinds are unsupported.