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_ssa/src/back | |
| parent | 8af3d8dcabc8970615dd386df7fde13c5794f004 (diff) | |
| download | rust-8a9db2545919f945ffbb215e4325917e0bfc5b3a.tar.gz rust-8a9db2545919f945ffbb215e4325917e0bfc5b3a.zip | |
Remove more `Session` methods that duplicate `DiagCtxt` methods.
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/back')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/link.rs | 8 | ||||
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/write.rs | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs index ae64b8ca588..4ff497f2fdd 100644 --- a/compiler/rustc_codegen_ssa/src/back/link.rs +++ b/compiler/rustc_codegen_ssa/src/back/link.rs @@ -716,7 +716,7 @@ fn link_dwarf_object<'a>( Ok(()) => {} Err(e) => { sess.dcx().emit_err(errors::ThorinErrorWrapper(e)); - sess.abort_if_errors(); + sess.dcx().abort_if_errors(); } } } @@ -765,7 +765,7 @@ fn link_natively<'a>( } // May have not found libraries in the right formats. - sess.abort_if_errors(); + sess.dcx().abort_if_errors(); // Invoke the system linker info!("{:?}", &cmd); @@ -970,7 +970,7 @@ fn link_natively<'a>( } } - sess.abort_if_errors(); + sess.dcx().abort_if_errors(); } info!("linker stderr:\n{}", escape_string(&prog.stderr)); info!("linker stdout:\n{}", escape_string(&prog.stdout)); @@ -993,7 +993,7 @@ fn link_natively<'a>( sess.dcx().emit_note(errors::CheckInstalledVisualStudio); sess.dcx().emit_note(errors::InsufficientVSCodeProduct); } - sess.abort_if_errors(); + sess.dcx().abort_if_errors(); } } diff --git a/compiler/rustc_codegen_ssa/src/back/write.rs b/compiler/rustc_codegen_ssa/src/back/write.rs index f7eda81da29..5a8db7bbf2d 100644 --- a/compiler/rustc_codegen_ssa/src/back/write.rs +++ b/compiler/rustc_codegen_ssa/src/back/write.rs @@ -1883,7 +1883,7 @@ impl SharedEmitterMain { err.emit(); } Ok(SharedEmitterMessage::AbortIfErrors) => { - sess.abort_if_errors(); + sess.dcx().abort_if_errors(); } Ok(SharedEmitterMessage::Fatal(msg)) => { sess.dcx().fatal(msg); @@ -1939,7 +1939,7 @@ impl<B: ExtraBackendMethods> OngoingCodegen<B> { let compiled_modules = sess.time("join_worker_thread", || match self.coordinator.join() { Ok(Ok(compiled_modules)) => compiled_modules, Ok(Err(())) => { - sess.abort_if_errors(); + sess.dcx().abort_if_errors(); panic!("expected abort due to worker thread errors") } Err(_) => { @@ -1947,7 +1947,7 @@ impl<B: ExtraBackendMethods> OngoingCodegen<B> { } }); - sess.abort_if_errors(); + sess.dcx().abort_if_errors(); let work_products = copy_all_cgu_workproducts_to_incr_comp_cache_dir(sess, &compiled_modules); |
