@@ -197,7 +197,7 @@ pub(crate) fn codegen_const_value<'tcx>(
197
197
let (alloc_id, offset) = ptr.into_parts(); // we know the `offset` is relative
198
198
// For vtables, get the underlying data allocation.
199
199
let alloc_id = match fx.tcx.global_alloc(alloc_id) {
200
- GlobalAlloc::Vtable (ty, trait_ref) => fx.tcx.vtable_allocation((ty, trait_ref)),
200
+ GlobalAlloc::VTable (ty, trait_ref) => fx.tcx.vtable_allocation((ty, trait_ref)),
201
201
_ => alloc_id,
202
202
};
203
203
let base_addr = match fx.tcx.global_alloc(alloc_id) {
@@ -221,7 +221,7 @@ pub(crate) fn codegen_const_value<'tcx>(
221
221
fx.module.declare_func_in_func(func_id, &mut fx.bcx.func);
222
222
fx.bcx.ins().func_addr(fx.pointer_type, local_func_id)
223
223
}
224
- GlobalAlloc::Vtable (..) => bug!("vtables are already handled"),
224
+ GlobalAlloc::VTable (..) => bug!("vtables are already handled"),
225
225
GlobalAlloc::Static(def_id) => {
226
226
assert!(fx.tcx.is_static(def_id));
227
227
let data_id = data_id_for_static(fx.tcx, fx.module, def_id, false);
@@ -364,7 +364,7 @@ fn define_all_allocs(tcx: TyCtxt<'_>, module: &mut dyn Module, cx: &mut Constant
364
364
//println!("alloc_id {}", alloc_id);
365
365
let alloc = match tcx.global_alloc(alloc_id) {
366
366
GlobalAlloc::Memory(alloc) => alloc,
367
- GlobalAlloc::Function(_) | GlobalAlloc::Static(_) | GlobalAlloc::Vtable (..) => {
367
+ GlobalAlloc::Function(_) | GlobalAlloc::Static(_) | GlobalAlloc::VTable (..) => {
368
368
unreachable!()
369
369
}
370
370
};
@@ -442,7 +442,7 @@ fn define_all_allocs(tcx: TyCtxt<'_>, module: &mut dyn Module, cx: &mut Constant
442
442
GlobalAlloc::Memory(target_alloc) => {
443
443
data_id_for_alloc_id(cx, module, alloc_id, target_alloc.inner().mutability)
444
444
}
445
- GlobalAlloc::Vtable (ty, trait_ref) => {
445
+ GlobalAlloc::VTable (ty, trait_ref) => {
446
446
let alloc_id = tcx.vtable_allocation((ty, trait_ref));
447
447
data_id_for_alloc_id(cx, module, alloc_id, Mutability::Not)
448
448
}
0 commit comments