From bfce24aa675072c832e5160acdefc4e98b7fe8f3 Mon Sep 17 00:00:00 2001 From: marmeladema Date: Thu, 16 Apr 2020 20:36:32 +0100 Subject: Modify `as_local_hir_id` to return a bare `HirId` --- src/librustc_codegen_llvm/consts.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/librustc_codegen_llvm') diff --git a/src/librustc_codegen_llvm/consts.rs b/src/librustc_codegen_llvm/consts.rs index ac2f47a740d..c97b547946e 100644 --- a/src/librustc_codegen_llvm/consts.rs +++ b/src/librustc_codegen_llvm/consts.rs @@ -210,7 +210,7 @@ impl CodegenCx<'ll, 'tcx> { debug!("get_static: sym={} instance={:?}", sym, instance); let g = if let Some(id) = - def_id.as_local().map(|def_id| self.tcx.hir().as_local_hir_id(def_id).unwrap()) + def_id.as_local().map(|def_id| self.tcx.hir().as_local_hir_id(def_id)) { let llty = self.layout_of(ty).llvm_type(self); let (g, attrs) = match self.tcx.hir().get(id) { -- cgit 1.4.1-3-g733a5