From 99472c7049783605444ab888a97059d0cce93a12 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Mon, 18 Dec 2023 22:21:37 +1100 Subject: Remove `Session` methods that duplicate `DiagCtxt` methods. Also add some `dcx` methods to types that wrap `TyCtxt`, for easier access. --- compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_codegen_ssa/src/debuginfo') diff --git a/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs b/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs index 2ecc5ad4fe4..1b01fe03654 100644 --- a/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs +++ b/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs @@ -93,7 +93,7 @@ fn push_debuginfo_type_name<'tcx>( Err(e) => { // Computing the layout can still fail here, e.g. if the target architecture // cannot represent the type. See https://github.com/rust-lang/rust/issues/94961. - tcx.sess.emit_fatal(e.into_diagnostic()); + tcx.dcx().emit_fatal(e.into_diagnostic()); } } } else { -- cgit 1.4.1-3-g733a5