about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/const_eval
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-07-16 22:30:51 +0200
committerGitHub <noreply@github.com>2022-07-16 22:30:51 +0200
commitfa298beb7941eaab01960630bfad13e40317ad00 (patch)
treea8a0d545f1fe4d1c02aaea7d7e53e94d9d8077a2 /compiler/rustc_const_eval/src/const_eval
parent984ef421fda3fb31fb72dd870d620921b3c174cc (diff)
parentc4cb043f063fb75d2278ebedeb13feaa94dc8c95 (diff)
downloadrust-fa298beb7941eaab01960630bfad13e40317ad00.tar.gz
rust-fa298beb7941eaab01960630bfad13e40317ad00.zip
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`
Diffstat (limited to 'compiler/rustc_const_eval/src/const_eval')
-rw-r--r--compiler/rustc_const_eval/src/const_eval/valtrees.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/const_eval/valtrees.rs b/compiler/rustc_const_eval/src/const_eval/valtrees.rs
index 2288a4e7b6c..8fff4571d12 100644
--- a/compiler/rustc_const_eval/src/const_eval/valtrees.rs
+++ b/compiler/rustc_const_eval/src/const_eval/valtrees.rs
@@ -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,