1
Fork 0

Visit type in process_projection_elem.

This commit is contained in:
Camille GILLOT 2021-10-16 14:03:30 +02:00
parent 6d246f0c8d
commit 29b30a9bd2
4 changed files with 6 additions and 60 deletions

View file

@ -1004,8 +1004,12 @@ macro_rules! visit_place_fns {
if new_local == local { None } else { Some(PlaceElem::Index(new_local)) }
}
PlaceElem::Field(field, ty) => {
let mut new_ty = ty;
self.visit_ty(&mut new_ty, TyContext::Location(location));
if ty != new_ty { Some(PlaceElem::Field(field, new_ty)) } else { None }
}
PlaceElem::Deref
| PlaceElem::Field(..)
| PlaceElem::ConstantIndex { .. }
| PlaceElem::Subslice { .. }
| PlaceElem::Downcast(..) => None,