From 8a9db2545919f945ffbb215e4325917e0bfc5b3a Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Thu, 21 Dec 2023 16:26:09 +1100 Subject: Remove more `Session` methods that duplicate `DiagCtxt` methods. --- compiler/rustc_incremental/src/persist/fs.rs | 2 +- compiler/rustc_incremental/src/persist/save.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'compiler/rustc_incremental') diff --git a/compiler/rustc_incremental/src/persist/fs.rs b/compiler/rustc_incremental/src/persist/fs.rs index f3fc7069e86..2c6ae91786d 100644 --- a/compiler/rustc_incremental/src/persist/fs.rs +++ b/compiler/rustc_incremental/src/persist/fs.rs @@ -312,7 +312,7 @@ pub fn finalize_session_directory(sess: &Session, svh: Option) { let incr_comp_session_dir: PathBuf = sess.incr_comp_session_dir().clone(); - if let Some(_) = sess.has_errors_or_span_delayed_bugs() { + if let Some(_) = sess.dcx().has_errors_or_span_delayed_bugs() { // If there have been any errors during compilation, we don't want to // publish this session directory. Rather, we'll just delete it. diff --git a/compiler/rustc_incremental/src/persist/save.rs b/compiler/rustc_incremental/src/persist/save.rs index f09a48a47fb..bdc935a5e3b 100644 --- a/compiler/rustc_incremental/src/persist/save.rs +++ b/compiler/rustc_incremental/src/persist/save.rs @@ -32,7 +32,7 @@ pub fn save_dep_graph(tcx: TyCtxt<'_>) { return; } // This is going to be deleted in finalize_session_directory, so let's not create it - if let Some(_) = sess.has_errors_or_span_delayed_bugs() { + if let Some(_) = sess.dcx().has_errors_or_span_delayed_bugs() { return; } @@ -87,7 +87,7 @@ pub fn save_work_product_index( return; } // This is going to be deleted in finalize_session_directory, so let's not create it - if let Some(_) = sess.has_errors_or_span_delayed_bugs() { + if let Some(_) = sess.dcx().has_errors_or_span_delayed_bugs() { return; } -- cgit 1.4.1-3-g733a5