]> git.proxmox.com Git - rustc.git/blobdiff - compiler/rustc_codegen_ssa/src/glue.rs
New upstream version 1.55.0+dfsg1
[rustc.git] / compiler / rustc_codegen_ssa / src / glue.rs
index b88de0b2411414ca9da2dd091737f15494c202f3..cf217b52c86f483677baeb62ca470db22c61b405 100644 (file)
@@ -23,7 +23,12 @@ pub fn size_and_align_of_dst<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
         ty::Dynamic(..) => {
             // load size/align from vtable
             let vtable = info.unwrap();
-            (meth::SIZE.get_usize(bx, vtable), meth::ALIGN.get_usize(bx, vtable))
+            (
+                meth::VirtualIndex::from_index(ty::COMMON_VTABLE_ENTRIES_SIZE)
+                    .get_usize(bx, vtable),
+                meth::VirtualIndex::from_index(ty::COMMON_VTABLE_ENTRIES_ALIGN)
+                    .get_usize(bx, vtable),
+            )
         }
         ty::Slice(_) | ty::Str => {
             let unit = layout.field(bx, 0);