about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/common.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-09-22 20:00:01 -0400
committerMichael Goulet <michael@errs.io>2024-09-23 19:38:26 -0400
commit702a644b74872104e23e26a8d9f7a8e99a4a5956 (patch)
tree4d99aa6464adaa4c8a3f6cb4a945438332bb1bed /compiler/rustc_codegen_llvm/src/common.rs
parent648d024a7859e1ab7fdffe5e419b6e35ccb16a4a (diff)
downloadrust-702a644b74872104e23e26a8d9f7a8e99a4a5956.tar.gz
rust-702a644b74872104e23e26a8d9f7a8e99a4a5956.zip
Check vtable projections for validity in miri
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/common.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/common.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/common.rs b/compiler/rustc_codegen_llvm/src/common.rs
index 508c2d1a820..6e37aead835 100644
--- a/compiler/rustc_codegen_llvm/src/common.rs
+++ b/compiler/rustc_codegen_llvm/src/common.rs
@@ -290,10 +290,10 @@ impl<'ll, 'tcx> ConstCodegenMethods<'tcx> for CodegenCx<'ll, 'tcx> {
                         self.get_fn_addr(instance.polymorphize(self.tcx)),
                         self.data_layout().instruction_address_space,
                     ),
-                    GlobalAlloc::VTable(ty, trait_ref) => {
+                    GlobalAlloc::VTable(ty, dyn_ty) => {
                         let alloc = self
                             .tcx
-                            .global_alloc(self.tcx.vtable_allocation((ty, trait_ref)))
+                            .global_alloc(self.tcx.vtable_allocation((ty, dyn_ty.principal())))
                             .unwrap_memory();
                         let init = const_alloc_to_llvm(self, alloc, /*static*/ false);
                         let value = self.static_addr_of(init, alloc.inner().align, None);