diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-12-18 22:21:37 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-12-24 08:05:28 +1100 |
| commit | 99472c7049783605444ab888a97059d0cce93a12 (patch) | |
| tree | 686e31682a9d9ae7601cf22722f1b43d3efea5db /compiler/rustc_codegen_cranelift/src/driver/jit.rs | |
| parent | d51db05d7ee1a12ee168f2d1ccc93ccc11b216c7 (diff) | |
| download | rust-99472c7049783605444ab888a97059d0cce93a12.tar.gz rust-99472c7049783605444ab888a97059d0cce93a12.zip | |
Remove `Session` methods that duplicate `DiagCtxt` methods.
Also add some `dcx` methods to types that wrap `TyCtxt`, for easier access.
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/driver/jit.rs')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/driver/jit.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/driver/jit.rs b/compiler/rustc_codegen_cranelift/src/driver/jit.rs index 6ee65d12c73..63fa89d79bc 100644 --- a/compiler/rustc_codegen_cranelift/src/driver/jit.rs +++ b/compiler/rustc_codegen_cranelift/src/driver/jit.rs @@ -94,11 +94,11 @@ fn create_jit_module( pub(crate) fn run_jit(tcx: TyCtxt<'_>, backend_config: BackendConfig) -> ! { if !tcx.sess.opts.output_types.should_codegen() { - tcx.sess.fatal("JIT mode doesn't work with `cargo check`"); + tcx.dcx().fatal("JIT mode doesn't work with `cargo check`"); } if !tcx.crate_types().contains(&rustc_session::config::CrateType::Executable) { - tcx.sess.fatal("can't jit non-executable crate"); + tcx.dcx().fatal("can't jit non-executable crate"); } let (mut jit_module, mut cx) = create_jit_module( @@ -141,14 +141,14 @@ pub(crate) fn run_jit(tcx: TyCtxt<'_>, backend_config: BackendConfig) -> ! { } MonoItem::GlobalAsm(item_id) => { let item = tcx.hir().item(item_id); - tcx.sess.span_fatal(item.span, "Global asm is not supported in JIT mode"); + tcx.dcx().span_fatal(item.span, "Global asm is not supported in JIT mode"); } } } }); if !cx.global_asm.is_empty() { - tcx.sess.fatal("Inline asm is not supported in JIT mode"); + tcx.dcx().fatal("Inline asm is not supported in JIT mode"); } tcx.sess.abort_if_errors(); |
