diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-12-21 16:26:09 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-12-24 08:17:47 +1100 |
| commit | 8a9db2545919f945ffbb215e4325917e0bfc5b3a (patch) | |
| tree | 435bcdd5e90f99b23e52f76535996e27c42ccf06 /compiler/rustc_codegen_cranelift/src | |
| parent | 8af3d8dcabc8970615dd386df7fde13c5794f004 (diff) | |
Remove more `Session` methods that duplicate `DiagCtxt` methods.
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/driver/aot.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/driver/jit.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/lib.rs | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/driver/aot.rs b/compiler/rustc_codegen_cranelift/src/driver/aot.rs index df457b16085..e77b0cd0721 100644 --- a/compiler/rustc_codegen_cranelift/src/driver/aot.rs +++ b/compiler/rustc_codegen_cranelift/src/driver/aot.rs @@ -108,7 +108,7 @@ impl OngoingCodegen { self.concurrency_limiter.finished(); - sess.abort_if_errors(); + sess.dcx().abort_if_errors(); ( CodegenResults { diff --git a/compiler/rustc_codegen_cranelift/src/driver/jit.rs b/compiler/rustc_codegen_cranelift/src/driver/jit.rs index 63fa89d79bc..7905ec8402d 100644 --- a/compiler/rustc_codegen_cranelift/src/driver/jit.rs +++ b/compiler/rustc_codegen_cranelift/src/driver/jit.rs @@ -151,7 +151,7 @@ pub(crate) fn run_jit(tcx: TyCtxt<'_>, backend_config: BackendConfig) -> ! { tcx.dcx().fatal("Inline asm is not supported in JIT mode"); } - tcx.sess.abort_if_errors(); + tcx.dcx().abort_if_errors(); jit_module.finalize_definitions().unwrap(); unsafe { cx.unwind_context.register_jit(&jit_module) }; @@ -338,7 +338,7 @@ fn dep_symbol_lookup_fn( .collect::<Box<[_]>>(), ); - sess.abort_if_errors(); + sess.dcx().abort_if_errors(); Box::new(move |sym_name| { for dylib in &*imported_dylibs { diff --git a/compiler/rustc_codegen_cranelift/src/lib.rs b/compiler/rustc_codegen_cranelift/src/lib.rs index b9e02587fbc..b482f0dd2f0 100644 --- a/compiler/rustc_codegen_cranelift/src/lib.rs +++ b/compiler/rustc_codegen_cranelift/src/lib.rs @@ -204,7 +204,7 @@ impl CodegenBackend for CraneliftCodegenBackend { metadata: EncodedMetadata, need_metadata_module: bool, ) -> Box<dyn Any> { - tcx.sess.abort_if_errors(); + tcx.dcx().abort_if_errors(); let config = self.config.borrow().clone().unwrap(); match config.codegen_mode { CodegenMode::Aot => driver::aot::run_aot(tcx, config, metadata, need_metadata_module), |
