use PlaceRef::iter_projections to fix old FIXME
I added this function in 53481a5a8f
This commit is contained in:
parent
7d1f57a757
commit
d84f7394a4
1 changed files with 3 additions and 5 deletions
|
@ -1111,11 +1111,9 @@ macro_rules! visit_place_fns {
|
||||||
context: PlaceContext,
|
context: PlaceContext,
|
||||||
location: Location,
|
location: Location,
|
||||||
) {
|
) {
|
||||||
// FIXME: Use PlaceRef::iter_projections, once that exists.
|
for (base, elem) in place_ref.iter_projections().rev() {
|
||||||
let mut cursor = place_ref.projection;
|
let base_proj = base.projection;
|
||||||
while let &[ref proj_base @ .., elem] = cursor {
|
self.visit_projection_elem(place_ref.local, base_proj, elem, context, location);
|
||||||
cursor = proj_base;
|
|
||||||
self.visit_projection_elem(place_ref.local, cursor, elem, context, location);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue