diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2021-01-30 19:18:48 +0100 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2021-02-15 19:24:58 +0100 |
| commit | bd3cd5dbed5f56fb44a14a20dd2113e3049d2565 (patch) | |
| tree | 83063aac7f1834f2bb10070fdfc42fa3787f4d31 /compiler/rustc_codegen_cranelift/src/driver/jit.rs | |
| parent | c676e358a506af3f97025fa248343552bddc57d9 (diff) | |
| download | rust-bd3cd5dbed5f56fb44a14a20dd2113e3049d2565.tar.gz rust-bd3cd5dbed5f56fb44a14a20dd2113e3049d2565.zip | |
Use an ItemId inside mir::GlobalAsm.
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/driver/jit.rs')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/driver/jit.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/driver/jit.rs b/compiler/rustc_codegen_cranelift/src/driver/jit.rs index 2d14ff2c022..f784d8d27cc 100644 --- a/compiler/rustc_codegen_cranelift/src/driver/jit.rs +++ b/compiler/rustc_codegen_cranelift/src/driver/jit.rs @@ -93,10 +93,9 @@ pub(super) fn run_jit(tcx: TyCtxt<'_>, codegen_mode: CodegenMode) -> ! { MonoItem::Static(def_id) => { crate::constant::codegen_static(&mut cx.constants_cx, def_id); } - MonoItem::GlobalAsm(hir_id) => { - let item = cx.tcx.hir().expect_item(hir_id); - tcx.sess - .span_fatal(item.span, "Global asm is not supported in JIT mode"); + MonoItem::GlobalAsm(item_id) => { + let item = cx.tcx.hir().item(item_id); + tcx.sess.span_fatal(item.span, "Global asm is not supported in JIT mode"); } } } |
