diff --git a/src/monomorphize_collector.rs b/src/monomorphize_collector.rs index 4deedb7..1cdf722 100644 --- a/src/monomorphize_collector.rs +++ b/src/monomorphize_collector.rs @@ -1179,8 +1179,8 @@ fn collect_alloc<'tcx>( trace!("collecting {:?} with {:#?}", alloc_id, instance); output.push(create_fn_mono_item(tcx, instance, DUMMY_SP)); } - GlobalAlloc::VTable(ty, trait_ref) => { - let alloc_id = tcx.vtable_allocation((ty, trait_ref)); + GlobalAlloc::VTable(ty, dyn_ty) => { + let alloc_id = tcx.vtable_allocation((ty, dyn_ty.principal())); collect_alloc(tcx, alloc_id, output) } } diff --git a/src/preempt_count/check.rs b/src/preempt_count/check.rs index 2ab7ef6..3c1b366 100644 --- a/src/preempt_count/check.rs +++ b/src/preempt_count/check.rs @@ -215,8 +215,8 @@ impl<'mir, 'tcx, 'cx> MirNeighborVisitor<'mir, 'tcx, 'cx> { GlobalAlloc::Function { instance, .. } => { self.check_fn_pointer_cast(instance, span)?; } - GlobalAlloc::VTable(ty, trait_ref) => { - self.check_vtable_construction(ty, trait_ref, span)?; + GlobalAlloc::VTable(ty, dyn_ty) => { + self.check_vtable_construction(ty, dyn_ty.principal(), span)?; } }