Remove more Session methods that duplicate DiagCtxt methods.

This commit is contained in:
Nicholas Nethercote 2023-12-21 16:26:09 +11:00
parent 7e213fe428
commit 93c86f78b2
3 changed files with 4 additions and 4 deletions

View File

@ -108,7 +108,7 @@ pub(crate) fn join(
self.concurrency_limiter.finished();
sess.abort_if_errors();
sess.dcx().abort_if_errors();
(
CodegenResults {

View File

@ -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 {

View File

@ -204,7 +204,7 @@ fn codegen_crate(
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),