Use an ItemId inside mir::GlobalAsm.
This commit is contained in:
parent
c676e358a5
commit
bd3cd5dbed
7 changed files with 32 additions and 21 deletions
|
@ -314,7 +314,7 @@ fn characteristic_def_id_of_mono_item<'tcx>(
|
|||
Some(def_id)
|
||||
}
|
||||
MonoItem::Static(def_id) => Some(def_id),
|
||||
MonoItem::GlobalAsm(hir_id) => Some(tcx.hir().local_def_id(hir_id).to_def_id()),
|
||||
MonoItem::GlobalAsm(item_id) => Some(tcx.hir().local_def_id(item_id.hir_id()).to_def_id()),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -405,8 +405,8 @@ fn mono_item_visibility(
|
|||
Visibility::Hidden
|
||||
};
|
||||
}
|
||||
MonoItem::GlobalAsm(hir_id) => {
|
||||
let def_id = tcx.hir().local_def_id(*hir_id);
|
||||
MonoItem::GlobalAsm(item_id) => {
|
||||
let def_id = tcx.hir().local_def_id(item_id.hir_id());
|
||||
return if tcx.is_reachable_non_generic(def_id) {
|
||||
*can_be_internalized = false;
|
||||
default_visibility(tcx, def_id.to_def_id(), false)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue