Skip to content

Commit 0bb82c4

Browse files
committedNov 28, 2020
expand iter_projections comment
1 parent 571da2c commit 0bb82c4

File tree

1 file changed

+4
-0
lines changed
  • compiler/rustc_middle/src/mir

1 file changed

+4
-0
lines changed
 

‎compiler/rustc_middle/src/mir/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1744,6 +1744,10 @@ impl<'tcx> Place<'tcx> {
17441744

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

0 commit comments

Comments
 (0)
Please sign in to comment.