1
Fork 0

make visit_projection take a PlaceRef

This commit is contained in:
Henry Boisdequin 2021-02-16 14:20:36 +05:30
parent 30c5125fbe
commit 5ec4b060a7
4 changed files with 7 additions and 18 deletions

View file

@ -95,7 +95,7 @@ where
// We purposefully do not call `super_place` here to avoid calling `visit_local` for this
// place with one of the `Projection` variants of `PlaceContext`.
self.visit_projection(local, projection, context, location);
self.visit_projection(place.as_ref(), context, location);
match DefUse::for_place(context) {
// Treat derefs as a use of the base local. `*p = 4` is not a def of `p` but a use.