diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-03-05 16:53:24 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-03-11 09:12:19 +1100 |
| commit | a09b1d33a703d4ed412e70d3197e73ba7e0937f9 (patch) | |
| tree | 7959dfa20498f06843d046aa3f31e3acf4de080a /compiler/rustc_codegen_ssa/src/errors.rs | |
| parent | 256d802233215bcd6e6791fb57c94bc98d762d4f (diff) | |
| download | rust-a09b1d33a703d4ed412e70d3197e73ba7e0937f9.tar.gz rust-a09b1d33a703d4ed412e70d3197e73ba7e0937f9.zip | |
Rename `IntoDiagnosticArg` as `IntoDiagArg`.
Also rename `into_diagnostic_arg` as `into_diag_arg`, and `NotIntoDiagnosticArg` as `NotInotDiagArg`.
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/errors.rs')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/errors.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/compiler/rustc_codegen_ssa/src/errors.rs b/compiler/rustc_codegen_ssa/src/errors.rs index 8fae80de064..04aed7086f8 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, EmissionGuarantee, IntoDiagArg, IntoDiagnostic, 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))) } } @@ -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("*_")), |
