iterate_over2(place_base, place_projection, &Projections::Empty, op)
}
+
+ pub fn as_place_ref(&self) -> PlaceRef<'_, 'tcx> {
+ PlaceRef {
+ base: &self.base,
+ projection: &self.projection,
+ }
+ }
}
impl From<Local> for Place<'_> {
context: PlaceContext,
location: Location) {
debug!("visit_place(place={:?}, context={:?})", place, context);
-
- let place_ref = mir::PlaceRef {
- base: &place.base,
- projection: &place.projection,
- };
- self.process_place(&place_ref, context, location);
+ self.process_place(&place.as_place_ref(), context, location);
}
fn visit_local(&mut self,