We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 571da2c commit 0bb82c4Copy full SHA for 0bb82c4
compiler/rustc_middle/src/mir/mod.rs
@@ -1744,6 +1744,10 @@ impl<'tcx> Place<'tcx> {
1744
1745
/// Iterate over the projections in evaluation order, i.e., the first element is the base with
1746
/// 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.
1751
pub fn iter_projections(
1752
self,
1753
) -> impl Iterator<Item = (PlaceRef<'tcx>, PlaceElem<'tcx>)> + DoubleEndedIterator {
0 commit comments