diff options
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/assert_module_sources.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/errors.rs | 11 |
2 files changed, 8 insertions, 9 deletions
diff --git a/compiler/rustc_codegen_ssa/src/assert_module_sources.rs b/compiler/rustc_codegen_ssa/src/assert_module_sources.rs index 7ecc3864347..e441aea8400 100644 --- a/compiler/rustc_codegen_ssa/src/assert_module_sources.rs +++ b/compiler/rustc_codegen_ssa/src/assert_module_sources.rs @@ -27,7 +27,7 @@ use crate::errors; use rustc_ast as ast; use rustc_data_structures::unord::UnordMap; use rustc_data_structures::unord::UnordSet; -use rustc_errors::{DiagArgValue, IntoDiagnosticArg}; +use rustc_errors::{DiagArgValue, IntoDiagArg}; use rustc_hir::def_id::LOCAL_CRATE; use rustc_middle::mir::mono::CodegenUnitNameBuilder; use rustc_middle::ty::TyCtxt; @@ -205,8 +205,8 @@ impl fmt::Display for CguReuse { } } -impl IntoDiagnosticArg for CguReuse { - fn into_diagnostic_arg(self) -> DiagArgValue { +impl IntoDiagArg for CguReuse { + fn into_diag_arg(self) -> DiagArgValue { DiagArgValue::Str(Cow::Owned(self.to_string())) } } 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("*_")), |
