From bd3cd5dbed5f56fb44a14a20dd2113e3049d2565 Mon Sep 17 00:00:00 2001 From: Camille GILLOT Date: Sat, 30 Jan 2021 19:18:48 +0100 Subject: Use an ItemId inside mir::GlobalAsm. --- compiler/rustc_codegen_ssa/src/mono_item.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/rustc_codegen_ssa/src') 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 { -- cgit 1.4.1-3-g733a5