Rollup merge of #99259 - RalfJung:visit-a-place, r=oli-obk

interpret/visitor: support visiting with a PlaceTy

Finally we can visit a `PlaceTy` in a way that will only do `force_allocation` when needed ti visit a field. :)

r? `@oli-obk`
This commit is contained in:
Matthias Krüger
2022-07-16 22:30:51 +02:00
committed by GitHub
6 changed files with 272 additions and 50 deletions

View File

@@ -436,7 +436,7 @@ fn valtree_into_mplace<'tcx>(
let offset = place_adjusted.layout.fields.offset(i);
place
.offset(
.offset_with_meta(
offset,
MemPlaceMeta::Meta(Scalar::from_machine_usize(
num_elems as u64,