Function strip_prefix

Source
fn strip_prefix<'tcx>(
    base_ty: Ty<'tcx>,
    projections: &[PlaceElem<'tcx>],
    prefix_projections: &[Projection<'tcx>],
) -> impl Iterator<Item = PlaceElem<'tcx>>
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 coroutine, i.e., an Index or a Subslice projection kinds are unsupported.