diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-12-18 06:21:26 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-12-18 16:06:21 +1100 |
| commit | 09af8a667c0fa456bbe62fa462f4b0f42f2845ec (patch) | |
| tree | 529aace2e7aef269509df93408bb13d189a575bf /compiler/rustc_codegen_ssa/src/back | |
| parent | 9df1576e1d477cfbfb4f39e779ce48552f9c28da (diff) | |
| download | rust-09af8a667c0fa456bbe62fa462f4b0f42f2845ec.tar.gz rust-09af8a667c0fa456bbe62fa462f4b0f42f2845ec.zip | |
Rename `Session::span_diagnostic` as `Session::dcx`.
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/back')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/link.rs | 10 | ||||
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/write.rs | 12 |
2 files changed, 11 insertions, 11 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs index 5d287e73c2d..289b61742ab 100644 --- a/compiler/rustc_codegen_ssa/src/back/link.rs +++ b/compiler/rustc_codegen_ssa/src/back/link.rs @@ -143,7 +143,7 @@ pub fn link_binary<'a>( } } if sess.opts.json_artifact_notifications { - sess.diagnostic().emit_artifact_notification(&out_filename, "link"); + sess.dcx().emit_artifact_notification(&out_filename, "link"); } if sess.prof.enabled() { @@ -183,13 +183,13 @@ pub fn link_binary<'a>( |preserve_objects: bool, preserve_dwarf_objects: bool, module: &CompiledModule| { if !preserve_objects { if let Some(ref obj) = module.object { - ensure_removed(sess.diagnostic(), obj); + ensure_removed(sess.dcx(), obj); } } if !preserve_dwarf_objects { if let Some(ref dwo_obj) = module.dwarf_object { - ensure_removed(sess.diagnostic(), dwo_obj); + ensure_removed(sess.dcx(), dwo_obj); } } }; @@ -208,7 +208,7 @@ pub fn link_binary<'a>( // Remove the temporary files if output goes to stdout for temp in tempfiles_for_stdout_output { - ensure_removed(sess.diagnostic(), &temp); + ensure_removed(sess.dcx(), &temp); } // If no requested outputs require linking, then the object temporaries should @@ -933,7 +933,7 @@ fn link_natively<'a>( command: &cmd, escaped_output, }; - sess.diagnostic().emit_err(err); + sess.dcx().emit_err(err); // If MSVC's `link.exe` was expected but the return code // is not a Microsoft LNK error then suggest a way to fix or // install the Visual Studio build tools. diff --git a/compiler/rustc_codegen_ssa/src/back/write.rs b/compiler/rustc_codegen_ssa/src/back/write.rs index d1c6d2ea5af..18509c583f5 100644 --- a/compiler/rustc_codegen_ssa/src/back/write.rs +++ b/compiler/rustc_codegen_ssa/src/back/write.rs @@ -558,7 +558,7 @@ fn produce_final_output_artifacts( } if !sess.opts.cg.save_temps && !keep_numbered { // The user just wants `foo.x`, not `foo.#module-name#.x`. - ensure_removed(sess.diagnostic(), &path); + ensure_removed(sess.dcx(), &path); } } else { let extension = crate_output @@ -649,19 +649,19 @@ fn produce_final_output_artifacts( for module in compiled_modules.modules.iter() { if let Some(ref path) = module.object { if !keep_numbered_objects { - ensure_removed(sess.diagnostic(), path); + ensure_removed(sess.dcx(), path); } } if let Some(ref path) = module.dwarf_object { if !keep_numbered_objects { - ensure_removed(sess.diagnostic(), path); + ensure_removed(sess.dcx(), path); } } if let Some(ref path) = module.bytecode { if !keep_numbered_bitcode { - ensure_removed(sess.diagnostic(), path); + ensure_removed(sess.dcx(), path); } } } @@ -669,7 +669,7 @@ fn produce_final_output_artifacts( if !user_wants_bitcode { if let Some(ref allocator_module) = compiled_modules.allocator_module { if let Some(ref path) = allocator_module.bytecode { - ensure_removed(sess.diagnostic(), path); + ensure_removed(sess.dcx(), path); } } } @@ -1842,7 +1842,7 @@ impl SharedEmitterMain { match message { Ok(SharedEmitterMessage::Diagnostic(diag)) => { - let handler = sess.diagnostic(); + let handler = sess.dcx(); let mut d = rustc_errors::Diagnostic::new_with_messages(diag.lvl, diag.msg); if let Some(code) = diag.code { d.code(code); |
