about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2021-01-30 19:18:48 +0100
committerCamille GILLOT <gillot.camille@gmail.com>2021-02-15 19:24:58 +0100
commitbd3cd5dbed5f56fb44a14a20dd2113e3049d2565 (patch)
tree83063aac7f1834f2bb10070fdfc42fa3787f4d31 /compiler/rustc_codegen_ssa
parentc676e358a506af3f97025fa248343552bddc57d9 (diff)
downloadrust-bd3cd5dbed5f56fb44a14a20dd2113e3049d2565.tar.gz
rust-bd3cd5dbed5f56fb44a14a20dd2113e3049d2565.zip
Use an ItemId inside mir::GlobalAsm.
Diffstat (limited to 'compiler/rustc_codegen_ssa')
-rw-r--r--compiler/rustc_codegen_ssa/src/mono_item.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_ssa/src/mono_item.rs b/compiler/rustc_codegen_ssa/src/mono_item.rs
index 607b5459673..8e79193759e 100644
--- a/compiler/rustc_codegen_ssa/src/mono_item.rs
+++ b/compiler/rustc_codegen_ssa/src/mono_item.rs
@@ -30,8 +30,8 @@ impl<'a, 'tcx: 'a> MonoItemExt<'a, 'tcx> for MonoItem<'tcx> {
             MonoItem::Static(def_id) => {
                 cx.codegen_static(def_id, cx.tcx().is_mutable_static(def_id));
             }
-            MonoItem::GlobalAsm(hir_id) => {
-                let item = cx.tcx().hir().expect_item(hir_id);
+            MonoItem::GlobalAsm(item_id) => {
+                let item = cx.tcx().hir().item(item_id);
                 if let hir::ItemKind::GlobalAsm(ref ga) = item.kind {
                     cx.codegen_global_asm(ga);
                 } else {