1
Fork 0

Miri function identity hack: account for possible inlining

This commit is contained in:
Ralf Jung 2024-07-02 21:05:22 +02:00
parent 7d97c59438
commit 41b98da42d
14 changed files with 80 additions and 47 deletions

View file

@ -310,7 +310,7 @@ impl<'tcx> ReachableContext<'tcx> {
GlobalAlloc::Static(def_id) => {
self.propagate_item(Res::Def(self.tcx.def_kind(def_id), def_id))
}
GlobalAlloc::Function(instance) => {
GlobalAlloc::Function { instance, .. } => {
// Manually visit to actually see the instance's `DefId`. Type visitors won't see it
self.propagate_item(Res::Def(
self.tcx.def_kind(instance.def_id()),