Skip to content

Commit

Permalink
GlobalAlloc::Function change
Browse files Browse the repository at this point in the history
  • Loading branch information
nbdd0121 committed Jul 8, 2024
1 parent dda23b1 commit 76653a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/monomorphize_collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1172,9 +1172,9 @@ fn collect_alloc<'tcx>(
});
}
}
GlobalAlloc::Function(fn_instance) => {
trace!("collecting {:?} with {:#?}", alloc_id, fn_instance);
output.push(create_fn_mono_item(tcx, fn_instance, DUMMY_SP));
GlobalAlloc::Function { instance, .. } => {
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));
Expand Down
4 changes: 2 additions & 2 deletions src/preempt_count/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ impl<'mir, 'tcx, 'cx> MirNeighborVisitor<'mir, 'tcx, 'cx> {
})?;
}
}
GlobalAlloc::Function(fn_instance) => {
self.check_fn_pointer_cast(fn_instance, span)?;
GlobalAlloc::Function { instance, .. } => {
self.check_fn_pointer_cast(instance, span)?;
}
GlobalAlloc::VTable(ty, trait_ref) => {
self.check_vtable_construction(ty, trait_ref, span)?;
Expand Down

0 comments on commit 76653a5

Please sign in to comment.