diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-02-23 14:37:48 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-02-28 08:55:37 +1100 |
| commit | 8199632aa88c15f8e8cba942b9e6c38826b141dd (patch) | |
| tree | 22d53c30c2a8db6d5eb40c5bed03da6e2f4ed172 /compiler/rustc_infer/src | |
| parent | 899cb40809a85eb9d89f6da3268713b83175360a (diff) | |
| download | rust-8199632aa88c15f8e8cba942b9e6c38826b141dd.tar.gz rust-8199632aa88c15f8e8cba942b9e6c38826b141dd.zip | |
Rename `DiagnosticArg{,Map,Name,Value}` as `DiagArg{,Map,Name,Value}`.
Diffstat (limited to 'compiler/rustc_infer/src')
5 files changed, 11 insertions, 11 deletions
diff --git a/compiler/rustc_infer/src/errors/mod.rs b/compiler/rustc_infer/src/errors/mod.rs index fd89ae9804d..4205366b23a 100644 --- a/compiler/rustc_infer/src/errors/mod.rs +++ b/compiler/rustc_infer/src/errors/mod.rs @@ -538,7 +538,7 @@ pub enum TyOrSig<'tcx> { } impl IntoDiagnosticArg for TyOrSig<'_> { - fn into_diagnostic_arg(self) -> rustc_errors::DiagnosticArgValue { + fn into_diagnostic_arg(self) -> rustc_errors::DiagArgValue { match self { TyOrSig::Ty(ty) => ty.into_diagnostic_arg(), TyOrSig::ClosureSig(sig) => sig.into_diagnostic_arg(), diff --git a/compiler/rustc_infer/src/errors/note_and_explain.rs b/compiler/rustc_infer/src/errors/note_and_explain.rs index 3e92edcf342..bbcb613b3e4 100644 --- a/compiler/rustc_infer/src/errors/note_and_explain.rs +++ b/compiler/rustc_infer/src/errors/note_and_explain.rs @@ -110,7 +110,7 @@ pub enum SuffixKind { } impl IntoDiagnosticArg for PrefixKind { - fn into_diagnostic_arg(self) -> rustc_errors::DiagnosticArgValue { + fn into_diagnostic_arg(self) -> rustc_errors::DiagArgValue { let kind = match self { Self::Empty => "empty", Self::RefValidFor => "ref_valid_for", @@ -127,19 +127,19 @@ impl IntoDiagnosticArg for PrefixKind { Self::DataValidFor => "data_valid_for", } .into(); - rustc_errors::DiagnosticArgValue::Str(kind) + rustc_errors::DiagArgValue::Str(kind) } } impl IntoDiagnosticArg for SuffixKind { - fn into_diagnostic_arg(self) -> rustc_errors::DiagnosticArgValue { + fn into_diagnostic_arg(self) -> rustc_errors::DiagArgValue { let kind = match self { Self::Empty => "empty", Self::Continues => "continues", Self::ReqByBinding => "req_by_binding", } .into(); - rustc_errors::DiagnosticArgValue::Str(kind) + rustc_errors::DiagArgValue::Str(kind) } } diff --git a/compiler/rustc_infer/src/infer/error_reporting/mod.rs b/compiler/rustc_infer/src/infer/error_reporting/mod.rs index 24bd2214504..6b27e364f1f 100644 --- a/compiler/rustc_infer/src/infer/error_reporting/mod.rs +++ b/compiler/rustc_infer/src/infer/error_reporting/mod.rs @@ -2899,7 +2899,7 @@ impl<'tcx> ObligationCause<'tcx> { pub struct ObligationCauseAsDiagArg<'tcx>(pub ObligationCause<'tcx>); impl IntoDiagnosticArg for ObligationCauseAsDiagArg<'_> { - fn into_diagnostic_arg(self) -> rustc_errors::DiagnosticArgValue { + fn into_diagnostic_arg(self) -> rustc_errors::DiagArgValue { use crate::traits::ObligationCauseCode::*; let kind = match self.0.code() { CompareImplItemObligation { kind: ty::AssocKind::Fn, .. } => "method_compat", @@ -2913,7 +2913,7 @@ impl IntoDiagnosticArg for ObligationCauseAsDiagArg<'_> { _ => "other", } .into(); - rustc_errors::DiagnosticArgValue::Str(kind) + rustc_errors::DiagArgValue::Str(kind) } } diff --git a/compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs b/compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs index 520c2d8be30..6c968c488fe 100644 --- a/compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs +++ b/compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs @@ -134,13 +134,13 @@ impl InferenceDiagnosticsParentData { } impl IntoDiagnosticArg for UnderspecifiedArgKind { - fn into_diagnostic_arg(self) -> rustc_errors::DiagnosticArgValue { + fn into_diagnostic_arg(self) -> rustc_errors::DiagArgValue { let kind = match self { Self::Type { .. } => "type", Self::Const { is_parameter: true } => "const_with_param", Self::Const { is_parameter: false } => "const", }; - rustc_errors::DiagnosticArgValue::Str(kind.into()) + rustc_errors::DiagArgValue::Str(kind.into()) } } diff --git a/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/placeholder_error.rs b/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/placeholder_error.rs index cc560611234..d6595a0c114 100644 --- a/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/placeholder_error.rs +++ b/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/placeholder_error.rs @@ -30,8 +30,8 @@ impl<'tcx, T> IntoDiagnosticArg for Highlighted<'tcx, T> where T: for<'a> Print<'tcx, FmtPrinter<'a, 'tcx>>, { - fn into_diagnostic_arg(self) -> rustc_errors::DiagnosticArgValue { - rustc_errors::DiagnosticArgValue::Str(self.to_string().into()) + fn into_diagnostic_arg(self) -> rustc_errors::DiagArgValue { + rustc_errors::DiagArgValue::Str(self.to_string().into()) } } |
