expand iter_projections comment

This commit is contained in:
Ralf Jung 2020-11-28 18:02:12 +01:00
parent 571da2c62d
commit 0bb82c4a05

View file

@ -1744,6 +1744,10 @@ impl<'tcx> Place<'tcx> {
/// Iterate over the projections in evaluation order, i.e., the first element is the base with
/// its projection and then subsequently more projections are added.
/// As a concrete example, given the place a.b.c, this would yield:
/// - (a, .b)
/// - (a.b, .c)
/// Given a place without projections, the iterator is empty.
pub fn iter_projections(
self,
) -> impl Iterator<Item = (PlaceRef<'tcx>, PlaceElem<'tcx>)> + DoubleEndedIterator {