Skip to content

Commit 93c86f7

Browse files
committed
Remove more Session methods that duplicate DiagCtxt methods.
1 parent 7e213fe commit 93c86f7

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/driver/aot.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ impl OngoingCodegen {
108108

109109
self.concurrency_limiter.finished();
110110

111-
sess.abort_if_errors();
111+
sess.dcx().abort_if_errors();
112112

113113
(
114114
CodegenResults {

src/driver/jit.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ pub(crate) fn run_jit(tcx: TyCtxt<'_>, backend_config: BackendConfig) -> ! {
151151
tcx.dcx().fatal("Inline asm is not supported in JIT mode");
152152
}
153153

154-
tcx.sess.abort_if_errors();
154+
tcx.dcx().abort_if_errors();
155155

156156
jit_module.finalize_definitions().unwrap();
157157
unsafe { cx.unwind_context.register_jit(&jit_module) };
@@ -338,7 +338,7 @@ fn dep_symbol_lookup_fn(
338338
.collect::<Box<[_]>>(),
339339
);
340340

341-
sess.abort_if_errors();
341+
sess.dcx().abort_if_errors();
342342

343343
Box::new(move |sym_name| {
344344
for dylib in &*imported_dylibs {

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ impl CodegenBackend for CraneliftCodegenBackend {
204204
metadata: EncodedMetadata,
205205
need_metadata_module: bool,
206206
) -> Box<dyn Any> {
207-
tcx.sess.abort_if_errors();
207+
tcx.dcx().abort_if_errors();
208208
let config = self.config.borrow().clone().unwrap();
209209
match config.codegen_mode {
210210
CodegenMode::Aot => driver::aot::run_aot(tcx, config, metadata, need_metadata_module),

0 commit comments

Comments
 (0)