1
Fork 0

Rollup merge of #82091 - henryboisdequin:use-place-ref-more, r=RalfJung

use PlaceRef abstractions more consistently

Addresses this [comment](https://github.com/rust-lang/rust/pull/80865/files#r558978715)
Associated issue: #80647

r? ```@RalfJung```
This commit is contained in:
Dylan DPC 2021-02-23 02:51:50 +01:00 committed by GitHub
commit cc07061190
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 22 additions and 23 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.