]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_codegen_ssa/src/meth.rs
Rollup merge of #89759 - jyn514:x-build-assemble, r=Mark-Simulacrum
[rust.git] / compiler / rustc_codegen_ssa / src / meth.rs
index efeec5b728413b88b54fe472890f9aab9239c30a..6ab429669c881302c4779a34bfbfecd32af9d1ff 100644 (file)
@@ -72,13 +72,13 @@ pub fn get_vtable<'tcx, Cx: CodegenMethods<'tcx>>(
         return val;
     }
 
-    let vtable_alloc_id = tcx.vtable_allocation(ty, trait_ref);
+    let vtable_alloc_id = tcx.vtable_allocation((ty, trait_ref));
     let vtable_allocation = tcx.global_alloc(vtable_alloc_id).unwrap_memory();
     let vtable_const = cx.const_data_from_alloc(vtable_allocation);
     let align = cx.data_layout().pointer_align.abi;
     let vtable = cx.static_addr_of(vtable_const, align, Some("vtable"));
 
-    cx.create_vtable_metadata(ty, vtable);
+    cx.create_vtable_metadata(ty, trait_ref, vtable);
     cx.vtables().borrow_mut().insert((ty, trait_ref), vtable);
     vtable
 }