diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-12-18 22:21:37 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-12-24 08:05:28 +1100 |
| commit | 99472c7049783605444ab888a97059d0cce93a12 (patch) | |
| tree | 686e31682a9d9ae7601cf22722f1b43d3efea5db /compiler/rustc_incremental/src/persist/save.rs | |
| parent | d51db05d7ee1a12ee168f2d1ccc93ccc11b216c7 (diff) | |
| download | rust-99472c7049783605444ab888a97059d0cce93a12.tar.gz rust-99472c7049783605444ab888a97059d0cce93a12.zip | |
Remove `Session` methods that duplicate `DiagCtxt` methods.
Also add some `dcx` methods to types that wrap `TyCtxt`, for easier access.
Diffstat (limited to 'compiler/rustc_incremental/src/persist/save.rs')
| -rw-r--r-- | compiler/rustc_incremental/src/persist/save.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_incremental/src/persist/save.rs b/compiler/rustc_incremental/src/persist/save.rs index ff0953e9f7b..f09a48a47fb 100644 --- a/compiler/rustc_incremental/src/persist/save.rs +++ b/compiler/rustc_incremental/src/persist/save.rs @@ -51,7 +51,7 @@ pub fn save_dep_graph(tcx: TyCtxt<'_>) { move || { sess.time("incr_comp_persist_dep_graph", || { if let Err(err) = fs::rename(&staging_dep_graph_path, &dep_graph_path) { - sess.emit_err(errors::MoveDepGraph { + sess.dcx().emit_err(errors::MoveDepGraph { from: &staging_dep_graph_path, to: &dep_graph_path, err, @@ -161,7 +161,7 @@ pub(crate) fn build_dep_graph( let mut encoder = match FileEncoder::new(&path_buf) { Ok(encoder) => encoder, Err(err) => { - sess.emit_err(errors::CreateDepGraph { path: &path_buf, err }); + sess.dcx().emit_err(errors::CreateDepGraph { path: &path_buf, err }); return None; } }; |
