Rename DiagnosticArg{,Map,Name,Value}
as DiagArg{,Map,Name,Value}
.
This commit is contained in:
parent
899cb40809
commit
8199632aa8
40 changed files with 196 additions and 198 deletions
|
@ -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(),
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue