@@ -161,13 +161,13 @@ pub(crate) fn codegen_const_value<'tcx>(
161
161
fx. module . declare_func_in_func ( func_id, & mut fx. bcx . func ) ;
162
162
fx. bcx . ins ( ) . func_addr ( fx. pointer_type , local_func_id)
163
163
}
164
- GlobalAlloc :: VTable ( ty, trait_ref ) => {
164
+ GlobalAlloc :: VTable ( ty, dyn_ty ) => {
165
165
let data_id = data_id_for_vtable (
166
166
fx. tcx ,
167
167
& mut fx. constants_cx ,
168
168
fx. module ,
169
169
ty,
170
- trait_ref ,
170
+ dyn_ty . principal ( ) ,
171
171
) ;
172
172
let local_data_id =
173
173
fx. module . declare_data_in_func ( data_id, & mut fx. bcx . func ) ;
@@ -456,8 +456,8 @@ fn define_all_allocs(tcx: TyCtxt<'_>, module: &mut dyn Module, cx: &mut Constant
456
456
GlobalAlloc :: Memory ( target_alloc) => {
457
457
data_id_for_alloc_id ( cx, module, alloc_id, target_alloc. inner ( ) . mutability )
458
458
}
459
- GlobalAlloc :: VTable ( ty, trait_ref ) => {
460
- data_id_for_vtable ( tcx, cx, module, ty, trait_ref )
459
+ GlobalAlloc :: VTable ( ty, dyn_ty ) => {
460
+ data_id_for_vtable ( tcx, cx, module, ty, dyn_ty . principal ( ) )
461
461
}
462
462
GlobalAlloc :: Static ( def_id) => {
463
463
if tcx. codegen_fn_attrs ( def_id) . flags . contains ( CodegenFnAttrFlags :: THREAD_LOCAL )
0 commit comments