Skip to content

Commit b141440

Browse files
committed
Move some Map methods onto TyCtxt.
The end goal is to eliminate `Map` altogether. I added a `hir_` prefix to all of them, that seemed simplest. The exceptions are `module_items` which became `hir_module_free_items` because there was already a `hir_module_items`, and `items` which became `hir_free_items` for consistency with `hir_module_free_items`.
1 parent 0b90953 commit b141440

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/driver/jit.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ pub(crate) fn run_jit(tcx: TyCtxt<'_>, codegen_mode: CodegenMode, jit_args: Vec<
124124
crate::constant::codegen_static(tcx, &mut jit_module, def_id);
125125
}
126126
MonoItem::GlobalAsm(item_id) => {
127-
let item = tcx.hir().item(item_id);
127+
let item = tcx.hir_item(item_id);
128128
tcx.dcx().span_fatal(item.span, "Global asm is not supported in JIT mode");
129129
}
130130
}

src/global_asm.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use rustc_target::asm::InlineAsmArch;
1515
use crate::prelude::*;
1616

1717
pub(crate) fn codegen_global_asm_item(tcx: TyCtxt<'_>, global_asm: &mut String, item_id: ItemId) {
18-
let item = tcx.hir().item(item_id);
18+
let item = tcx.hir_item(item_id);
1919
if let rustc_hir::ItemKind::GlobalAsm(asm) = item.kind {
2020
let is_x86 =
2121
matches!(tcx.sess.asm_arch.unwrap(), InlineAsmArch::X86 | InlineAsmArch::X86_64);

0 commit comments

Comments
 (0)