subtyping_projections
This commit is contained in:
parent
177091258c
commit
3148e6a993
28 changed files with 431 additions and 5 deletions
|
@ -57,6 +57,7 @@ impl<'tcx> Lift for PlaceElem<'tcx> {
|
|||
ProjectionElem::ConstantIndex { offset, min_length, from_end }
|
||||
}
|
||||
ProjectionElem::Downcast(a, u) => ProjectionElem::Downcast(a, u),
|
||||
ProjectionElem::Subtype(ty) => ProjectionElem::Subtype(ty.lift()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -112,6 +112,9 @@ impl<'b, 'a, 'tcx> Gatherer<'b, 'a, 'tcx> {
|
|||
let mut union_path = None;
|
||||
|
||||
for (place_ref, elem) in data.rev_lookup.un_derefer.iter_projections(place.as_ref()) {
|
||||
if elem.is_subtype() {
|
||||
continue;
|
||||
}
|
||||
let body = self.builder.body;
|
||||
let tcx = self.builder.tcx;
|
||||
let place_ty = place_ref.ty(body, tcx).ty;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue