about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src/errors.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-03-11 00:34:44 +0000
committerbors <bors@rust-lang.org>2024-03-11 00:34:44 +0000
commitcd81f5b27ee00b49d413db50b5e6af871cebcf23 (patch)
treede825c76d6714c2be261ff363eb2c840c2484578 /compiler/rustc_codegen_ssa/src/errors.rs
parent76ee6fc926032c16a5706086922fc1125c061b70 (diff)
parent43c06335cf2d1cc6b12fcfa5b8795d9becc52e8c (diff)
downloadrust-cd81f5b27ee00b49d413db50b5e6af871cebcf23.tar.gz
rust-cd81f5b27ee00b49d413db50b5e6af871cebcf23.zip
Auto merge of #122132 - nnethercote:diag-renaming3, r=nnethercote
Diagnostic renaming 3

A sequel to https://github.com/rust-lang/rust/pull/121780.

r? `@davidtwco`
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/errors.rs')
-rw-r--r--compiler/rustc_codegen_ssa/src/errors.rs19
1 files changed, 9 insertions, 10 deletions
diff --git a/compiler/rustc_codegen_ssa/src/errors.rs b/compiler/rustc_codegen_ssa/src/errors.rs
index 8fae80de064..3572ee301c8 100644
--- a/compiler/rustc_codegen_ssa/src/errors.rs
+++ b/compiler/rustc_codegen_ssa/src/errors.rs
@@ -4,8 +4,7 @@ use crate::assert_module_sources::CguReuse;
 use crate::back::command::Command;
 use crate::fluent_generated as fluent;
 use rustc_errors::{
-    codes::*, Diag, DiagArgValue, DiagCtxt, EmissionGuarantee, IntoDiagnostic, IntoDiagnosticArg,
-    Level,
+    codes::*, Diag, DiagArgValue, DiagCtxt, Diagnostic, EmissionGuarantee, IntoDiagArg, Level,
 };
 use rustc_macros::Diagnostic;
 use rustc_middle::ty::layout::LayoutError;
@@ -152,8 +151,8 @@ impl<'a> CopyPath<'a> {
 
 struct DebugArgPath<'a>(pub &'a Path);
 
-impl IntoDiagnosticArg for DebugArgPath<'_> {
-    fn into_diagnostic_arg(self) -> rustc_errors::DiagArgValue {
+impl IntoDiagArg for DebugArgPath<'_> {
+    fn into_diag_arg(self) -> rustc_errors::DiagArgValue {
         DiagArgValue::Str(Cow::Owned(format!("{:?}", self.0)))
     }
 }
@@ -215,8 +214,8 @@ pub enum LinkRlibError {
 
 pub struct ThorinErrorWrapper(pub thorin::Error);
 
-impl<G: EmissionGuarantee> IntoDiagnostic<'_, G> for ThorinErrorWrapper {
-    fn into_diagnostic(self, dcx: &DiagCtxt, level: Level) -> Diag<'_, G> {
+impl<G: EmissionGuarantee> Diagnostic<'_, G> for ThorinErrorWrapper {
+    fn into_diag(self, dcx: &DiagCtxt, level: Level) -> Diag<'_, G> {
         let build = |msg| Diag::new(dcx, level, msg);
         match self.0 {
             thorin::Error::ReadInput(_) => build(fluent::codegen_ssa_thorin_read_input_failure),
@@ -348,8 +347,8 @@ pub struct LinkingFailed<'a> {
     pub escaped_output: String,
 }
 
-impl<G: EmissionGuarantee> IntoDiagnostic<'_, G> for LinkingFailed<'_> {
-    fn into_diagnostic(self, dcx: &DiagCtxt, level: Level) -> Diag<'_, G> {
+impl<G: EmissionGuarantee> Diagnostic<'_, G> for LinkingFailed<'_> {
+    fn into_diag(self, dcx: &DiagCtxt, level: Level) -> Diag<'_, G> {
         let mut diag = Diag::new(dcx, level, fluent::codegen_ssa_linking_failed);
         diag.arg("linker_path", format!("{}", self.linker_path.display()));
         diag.arg("exit_status", format!("{}", self.exit_status));
@@ -974,8 +973,8 @@ pub enum ExpectedPointerMutability {
     Not,
 }
 
-impl IntoDiagnosticArg for ExpectedPointerMutability {
-    fn into_diagnostic_arg(self) -> DiagArgValue {
+impl IntoDiagArg for ExpectedPointerMutability {
+    fn into_diag_arg(self) -> DiagArgValue {
         match self {
             ExpectedPointerMutability::Mut => DiagArgValue::Str(Cow::Borrowed("*mut")),
             ExpectedPointerMutability::Not => DiagArgValue::Str(Cow::Borrowed("*_")),