1
Fork 0

Auto merge of #121489 - nnethercote:diag-renaming, r=davidtwco

Diagnostic renaming

Renaming various diagnostic types from `Diagnostic*` to `Diag*`. Part of https://github.com/rust-lang/compiler-team/issues/722. There are more to do but this is enough for one PR.

r? `@davidtwco`
This commit is contained in:
bors 2024-02-28 20:39:38 +00:00
commit c475e2303b
182 changed files with 1528 additions and 1775 deletions

View file

@ -1,6 +1,6 @@
use std::fmt;
use rustc_errors::{codes::*, DiagnosticArgName, DiagnosticArgValue, DiagnosticMessage};
use rustc_errors::{codes::*, DiagArgName, DiagArgValue, DiagnosticMessage};
use rustc_macros::Diagnostic;
use rustc_span::{Span, Symbol};
@ -94,14 +94,14 @@ pub(super) struct ConstNotUsedTraitAlias {
pub struct CustomSubdiagnostic<'a> {
pub msg: fn() -> DiagnosticMessage,
pub add_args: Box<dyn FnOnce(&mut dyn FnMut(DiagnosticArgName, DiagnosticArgValue)) + 'a>,
pub add_args: Box<dyn FnOnce(&mut dyn FnMut(DiagArgName, DiagArgValue)) + 'a>,
}
impl<'a> CustomSubdiagnostic<'a> {
pub fn label(x: fn() -> DiagnosticMessage) -> Self {
Self::label_and_then(x, |_| {})
}
pub fn label_and_then<F: FnOnce(&mut dyn FnMut(DiagnosticArgName, DiagnosticArgValue)) + 'a>(
pub fn label_and_then<F: FnOnce(&mut dyn FnMut(DiagArgName, DiagArgValue)) + 'a>(
msg: fn() -> DiagnosticMessage,
f: F,
) -> Self {

View file

@ -2,7 +2,7 @@ use std::cmp;
use rustc_data_structures::fx::FxIndexMap;
use rustc_data_structures::sorted_map::SortedMap;
use rustc_errors::{DiagnosticBuilder, DiagnosticMessage, MultiSpan};
use rustc_errors::{Diag, DiagnosticMessage, MultiSpan};
use rustc_hir::{HirId, ItemLocalId};
use rustc_session::lint::{
builtin::{self, FORBIDDEN_LINT_GROUPS},
@ -204,7 +204,7 @@ pub fn explain_lint_level_source(
lint: &'static Lint,
level: Level,
src: LintLevelSource,
err: &mut DiagnosticBuilder<'_, ()>,
err: &mut Diag<'_, ()>,
) {
let name = lint.name_lower();
if let Level::Allow = level {
@ -260,8 +260,7 @@ pub fn explain_lint_level_source(
///
/// ## `decorate`
///
/// It is not intended to call `emit`/`cancel` on the `DiagnosticBuilder` passed
/// in the `decorate` callback.
/// It is not intended to call `emit`/`cancel` on the `Diag` passed in the `decorate` callback.
#[track_caller]
pub fn lint_level(
sess: &Session,
@ -270,7 +269,7 @@ pub fn lint_level(
src: LintLevelSource,
span: Option<MultiSpan>,
msg: impl Into<DiagnosticMessage>,
decorate: impl for<'a, 'b> FnOnce(&'b mut DiagnosticBuilder<'a, ()>),
decorate: impl for<'a, 'b> FnOnce(&'b mut Diag<'a, ()>),
) {
// Avoid codegen bloat from monomorphization by immediately doing dyn dispatch of `decorate` to
// the "real" work.
@ -282,7 +281,7 @@ pub fn lint_level(
src: LintLevelSource,
span: Option<MultiSpan>,
msg: impl Into<DiagnosticMessage>,
decorate: Box<dyn '_ + for<'a, 'b> FnOnce(&'b mut DiagnosticBuilder<'a, ()>)>,
decorate: Box<dyn '_ + for<'a, 'b> FnOnce(&'b mut Diag<'a, ()>)>,
) {
// Check for future incompatibility lints and issue a stronger warning.
let future_incompatible = lint.future_incompatible;
@ -314,7 +313,7 @@ pub fn lint_level(
//
// We can also not mark the lint expectation as fulfilled here right away, as it
// can still be cancelled in the decorate function. All of this means that we simply
// create a `DiagnosticBuilder` and continue as we would for warnings.
// create a `Diag` and continue as we would for warnings.
rustc_errors::Level::Expect(expect_id)
}
Level::ForceWarn(Some(expect_id)) => rustc_errors::Level::ForceWarning(Some(expect_id)),
@ -322,7 +321,7 @@ pub fn lint_level(
Level::Warn => rustc_errors::Level::Warning,
Level::Deny | Level::Forbid => rustc_errors::Level::Error,
};
let mut err = DiagnosticBuilder::new(sess.dcx(), err_level, "");
let mut err = Diag::new(sess.dcx(), err_level, "");
if let Some(span) = span {
err.span(span);
}

View file

@ -9,7 +9,7 @@ use rustc_attr::{
self as attr, ConstStability, DefaultBodyStability, DeprecatedSince, Deprecation, Stability,
};
use rustc_data_structures::unord::UnordMap;
use rustc_errors::{Applicability, DiagnosticBuilder};
use rustc_errors::{Applicability, Diag};
use rustc_feature::GateIssue;
use rustc_hir::def::DefKind;
use rustc_hir::def_id::{DefId, LocalDefId, LocalDefIdMap};
@ -125,7 +125,7 @@ pub fn report_unstable(
}
pub fn deprecation_suggestion(
diag: &mut DiagnosticBuilder<'_, ()>,
diag: &mut Diag<'_, ()>,
kind: &str,
suggestion: Option<Symbol>,
span: Span,

View file

@ -7,7 +7,7 @@ use crate::ty::{layout, tls, Ty, TyCtxt, ValTree};
use rustc_ast_ir::Mutability;
use rustc_data_structures::sync::Lock;
use rustc_errors::{
DiagnosticArgName, DiagnosticArgValue, DiagnosticMessage, ErrorGuaranteed, IntoDiagnosticArg,
DiagArgName, DiagArgValue, DiagnosticMessage, ErrorGuaranteed, IntoDiagnosticArg,
};
use rustc_macros::HashStable;
use rustc_session::CtfeBacktrace;
@ -237,8 +237,8 @@ pub enum InvalidMetaKind {
}
impl IntoDiagnosticArg for InvalidMetaKind {
fn into_diagnostic_arg(self) -> DiagnosticArgValue {
DiagnosticArgValue::Str(Cow::Borrowed(match self {
fn into_diagnostic_arg(self) -> DiagArgValue {
DiagArgValue::Str(Cow::Borrowed(match self {
InvalidMetaKind::SliceTooBig => "slice_too_big",
InvalidMetaKind::TooBig => "too_big",
}))
@ -271,8 +271,8 @@ pub struct Misalignment {
macro_rules! impl_into_diagnostic_arg_through_debug {
($($ty:ty),*$(,)?) => {$(
impl IntoDiagnosticArg for $ty {
fn into_diagnostic_arg(self) -> DiagnosticArgValue {
DiagnosticArgValue::Str(Cow::Owned(format!("{self:?}")))
fn into_diagnostic_arg(self) -> DiagArgValue {
DiagArgValue::Str(Cow::Owned(format!("{self:?}")))
}
}
)*}
@ -373,8 +373,8 @@ pub enum PointerKind {
}
impl IntoDiagnosticArg for PointerKind {
fn into_diagnostic_arg(self) -> DiagnosticArgValue {
DiagnosticArgValue::Str(
fn into_diagnostic_arg(self) -> DiagArgValue {
DiagArgValue::Str(
match self {
Self::Ref(_) => "ref",
Self::Box => "box",
@ -493,7 +493,7 @@ pub trait MachineStopType: Any + fmt::Debug + Send {
fn diagnostic_message(&self) -> DiagnosticMessage;
/// Add diagnostic arguments by passing name and value pairs to `adder`, which are passed to
/// fluent for formatting the translated diagnostic message.
fn add_args(self: Box<Self>, adder: &mut dyn FnMut(DiagnosticArgName, DiagnosticArgValue));
fn add_args(self: Box<Self>, adder: &mut dyn FnMut(DiagArgName, DiagArgValue));
}
impl dyn MachineStopType {

View file

@ -15,7 +15,7 @@ use crate::ty::{GenericArg, GenericArgsRef};
use rustc_data_structures::captures::Captures;
use rustc_errors::{
DiagnosticArgName, DiagnosticArgValue, DiagnosticMessage, ErrorGuaranteed, IntoDiagnosticArg,
DiagArgName, DiagArgValue, DiagnosticMessage, ErrorGuaranteed, IntoDiagnosticArg,
};
use rustc_hir::def::{CtorKind, Namespace};
use rustc_hir::def_id::{DefId, CRATE_DEF_ID};

View file

@ -292,7 +292,7 @@ impl<O> AssertKind<O> {
}
}
pub fn add_args(self, adder: &mut dyn FnMut(DiagnosticArgName, DiagnosticArgValue))
pub fn add_args(self, adder: &mut dyn FnMut(DiagArgName, DiagArgValue))
where
O: fmt::Debug,
{

View file

@ -9,7 +9,7 @@
//! [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/thir.html
use rustc_ast::{InlineAsmOptions, InlineAsmTemplatePiece};
use rustc_errors::{DiagnosticArgValue, IntoDiagnosticArg};
use rustc_errors::{DiagArgValue, IntoDiagnosticArg};
use rustc_hir as hir;
use rustc_hir::def_id::DefId;
use rustc_hir::RangeEnd;
@ -674,7 +674,7 @@ impl<'tcx> Pat<'tcx> {
}
impl<'tcx> IntoDiagnosticArg for Pat<'tcx> {
fn into_diagnostic_arg(self) -> DiagnosticArgValue {
fn into_diagnostic_arg(self) -> DiagArgValue {
format!("{self}").into_diagnostic_arg()
}
}

View file

@ -16,7 +16,7 @@ use crate::ty::GenericArgsRef;
use crate::ty::{self, AdtKind, Ty};
use rustc_data_structures::sync::Lrc;
use rustc_errors::{Applicability, DiagnosticBuilder, EmissionGuarantee};
use rustc_errors::{Applicability, Diag, EmissionGuarantee};
use rustc_hir as hir;
use rustc_hir::def_id::DefId;
use rustc_span::def_id::{LocalDefId, CRATE_DEF_ID};
@ -908,7 +908,7 @@ pub enum ObjectSafetyViolationSolution {
}
impl ObjectSafetyViolationSolution {
pub fn add_to<G: EmissionGuarantee>(self, err: &mut DiagnosticBuilder<'_, G>) {
pub fn add_to<G: EmissionGuarantee>(self, err: &mut Diag<'_, G>) {
match self {
ObjectSafetyViolationSolution::None => {}
ObjectSafetyViolationSolution::AddSelfOrMakeSized {

View file

@ -1,6 +1,6 @@
use rustc_apfloat::ieee::{Double, Single};
use rustc_apfloat::Float;
use rustc_errors::{DiagnosticArgValue, IntoDiagnosticArg};
use rustc_errors::{DiagArgValue, IntoDiagnosticArg};
use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};
use rustc_target::abi::Size;
use std::fmt;
@ -117,8 +117,8 @@ impl std::fmt::Debug for ConstInt {
impl IntoDiagnosticArg for ConstInt {
// FIXME this simply uses the Debug impl, but we could probably do better by converting both
// to an inherent method that returns `Cow`.
fn into_diagnostic_arg(self) -> DiagnosticArgValue {
DiagnosticArgValue::Str(format!("{self:?}").into())
fn into_diagnostic_arg(self) -> DiagArgValue {
DiagArgValue::Str(format!("{self:?}").into())
}
}

View file

@ -15,7 +15,7 @@ pub struct UnevaluatedConst<'tcx> {
}
impl rustc_errors::IntoDiagnosticArg for UnevaluatedConst<'_> {
fn into_diagnostic_arg(self) -> rustc_errors::DiagnosticArgValue {
fn into_diagnostic_arg(self) -> rustc_errors::DiagArgValue {
format!("{self:?}").into_diagnostic_arg()
}
}

View file

@ -43,9 +43,7 @@ use rustc_data_structures::sync::{self, FreezeReadGuard, Lock, WorkerLocal};
#[cfg(parallel_compiler)]
use rustc_data_structures::sync::{DynSend, DynSync};
use rustc_data_structures::unord::UnordSet;
use rustc_errors::{
DecorateLint, DiagCtxt, DiagnosticBuilder, DiagnosticMessage, ErrorGuaranteed, MultiSpan,
};
use rustc_errors::{DecorateLint, Diag, DiagCtxt, DiagnosticMessage, ErrorGuaranteed, MultiSpan};
use rustc_hir as hir;
use rustc_hir::def::DefKind;
use rustc_hir::def_id::{CrateNum, DefId, LocalDefId, LOCAL_CRATE};
@ -2117,7 +2115,7 @@ impl<'tcx> TyCtxt<'tcx> {
hir_id: HirId,
span: impl Into<MultiSpan>,
msg: impl Into<DiagnosticMessage>,
decorate: impl for<'a, 'b> FnOnce(&'b mut DiagnosticBuilder<'a, ()>),
decorate: impl for<'a, 'b> FnOnce(&'b mut Diag<'a, ()>),
) {
let (level, src) = self.lint_level_at_node(lint, hir_id);
lint_level(self.sess, lint, level, src, Some(span.into()), msg, decorate);
@ -2147,7 +2145,7 @@ impl<'tcx> TyCtxt<'tcx> {
lint: &'static Lint,
id: HirId,
msg: impl Into<DiagnosticMessage>,
decorate: impl for<'a, 'b> FnOnce(&'b mut DiagnosticBuilder<'a, ()>),
decorate: impl for<'a, 'b> FnOnce(&'b mut Diag<'a, ()>),
) {
let (level, src) = self.lint_level_at_node(lint, id);
lint_level(self.sess, lint, level, src, None, msg, decorate);

View file

@ -3,7 +3,7 @@ use super::{GlobalCtxt, TyCtxt};
use crate::dep_graph::TaskDepsRef;
use crate::query::plumbing::QueryJobId;
use rustc_data_structures::sync::{self, Lock};
use rustc_errors::Diagnostic;
use rustc_errors::DiagInner;
#[cfg(not(parallel_compiler))]
use std::cell::Cell;
use std::mem;
@ -26,7 +26,7 @@ pub struct ImplicitCtxt<'a, 'tcx> {
/// Where to store diagnostics for the current query job, if any.
/// This is updated by `JobOwner::start` in `ty::query::plumbing` when executing a query.
pub diagnostics: Option<&'a Lock<ThinVec<Diagnostic>>>,
pub diagnostics: Option<&'a Lock<ThinVec<DiagInner>>>,
/// Used to prevent queries from calling too deeply.
pub query_depth: usize,

View file

@ -11,7 +11,7 @@ use crate::ty::{
};
use rustc_data_structures::fx::FxHashMap;
use rustc_errors::{Applicability, DiagnosticArgValue, DiagnosticBuilder, IntoDiagnosticArg};
use rustc_errors::{Applicability, Diag, DiagArgValue, IntoDiagnosticArg};
use rustc_hir as hir;
use rustc_hir::def::DefKind;
use rustc_hir::def_id::DefId;
@ -20,7 +20,7 @@ use rustc_span::{BytePos, Span};
use rustc_type_ir::TyKind::*;
impl<'tcx> IntoDiagnosticArg for Ty<'tcx> {
fn into_diagnostic_arg(self) -> DiagnosticArgValue {
fn into_diagnostic_arg(self) -> DiagArgValue {
self.to_string().into_diagnostic_arg()
}
}
@ -111,7 +111,7 @@ where
pub fn suggest_arbitrary_trait_bound<'tcx>(
tcx: TyCtxt<'tcx>,
generics: &hir::Generics<'_>,
err: &mut DiagnosticBuilder<'_>,
err: &mut Diag<'_>,
trait_pred: PolyTraitPredicate<'tcx>,
associated_ty: Option<(&'static str, Ty<'tcx>)>,
) -> bool {
@ -216,7 +216,7 @@ fn suggest_changing_unsized_bound(
pub fn suggest_constraining_type_param(
tcx: TyCtxt<'_>,
generics: &hir::Generics<'_>,
err: &mut DiagnosticBuilder<'_>,
err: &mut Diag<'_>,
param_name: &str,
constraint: &str,
def_id: Option<DefId>,
@ -235,7 +235,7 @@ pub fn suggest_constraining_type_param(
pub fn suggest_constraining_type_params<'a>(
tcx: TyCtxt<'_>,
generics: &hir::Generics<'_>,
err: &mut DiagnosticBuilder<'_>,
err: &mut Diag<'_>,
param_names_and_constraints: impl Iterator<Item = (&'a str, &'a str, Option<DefId>)>,
span_to_replace: Option<Span>,
) -> bool {

View file

@ -7,7 +7,7 @@ use crate::ty::visit::{TypeVisitable, TypeVisitableExt, TypeVisitor};
use crate::ty::{self, Lift, List, ParamConst, Ty, TyCtxt};
use rustc_data_structures::intern::Interned;
use rustc_errors::{DiagnosticArgValue, IntoDiagnosticArg};
use rustc_errors::{DiagArgValue, IntoDiagnosticArg};
use rustc_hir::def_id::DefId;
use rustc_macros::HashStable;
use rustc_serialize::{Decodable, Encodable};
@ -56,7 +56,7 @@ unsafe impl<'tcx> Sync for GenericArg<'tcx> where
}
impl<'tcx> IntoDiagnosticArg for GenericArg<'tcx> {
fn into_diagnostic_arg(self) -> DiagnosticArgValue {
fn into_diagnostic_arg(self) -> DiagArgValue {
self.to_string().into_diagnostic_arg()
}
}

View file

@ -5,8 +5,7 @@ use crate::ty::normalize_erasing_regions::NormalizationError;
use crate::ty::{self, ConstKind, Ty, TyCtxt, TypeVisitableExt};
use rustc_error_messages::DiagnosticMessage;
use rustc_errors::{
DiagCtxt, DiagnosticArgValue, DiagnosticBuilder, EmissionGuarantee, IntoDiagnostic,
IntoDiagnosticArg, Level,
Diag, DiagArgValue, DiagCtxt, EmissionGuarantee, IntoDiagnostic, IntoDiagnosticArg, Level,
};
use rustc_hir as hir;
use rustc_hir::def_id::DefId;
@ -253,7 +252,7 @@ impl<'tcx> fmt::Display for LayoutError<'tcx> {
}
impl<'tcx> IntoDiagnosticArg for LayoutError<'tcx> {
fn into_diagnostic_arg(self) -> DiagnosticArgValue {
fn into_diagnostic_arg(self) -> DiagArgValue {
self.to_string().into_diagnostic_arg()
}
}
@ -1262,7 +1261,7 @@ pub enum FnAbiError<'tcx> {
}
impl<'a, 'b, G: EmissionGuarantee> IntoDiagnostic<'a, G> for FnAbiError<'b> {
fn into_diagnostic(self, dcx: &'a DiagCtxt, level: Level) -> DiagnosticBuilder<'a, G> {
fn into_diagnostic(self, dcx: &'a DiagCtxt, level: Level) -> Diag<'a, G> {
match self {
Self::Layout(e) => e.into_diagnostic().into_diagnostic(dcx, level),
Self::AdjustForForeignAbi(call::AdjustForForeignAbiError::Unsupported {

View file

@ -40,7 +40,7 @@ use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
use rustc_data_structures::steal::Steal;
use rustc_data_structures::tagged_ptr::CopyTaggedPtr;
use rustc_data_structures::unord::UnordMap;
use rustc_errors::{DiagnosticBuilder, ErrorGuaranteed, StashKey};
use rustc_errors::{Diag, ErrorGuaranteed, StashKey};
use rustc_hir as hir;
use rustc_hir::def::{CtorKind, CtorOf, DefKind, DocLinkResMap, LifetimeRes, Res};
use rustc_hir::def_id::{CrateNum, DefId, DefIdMap, LocalDefId, LocalDefIdMap, LocalDefIdSet};
@ -846,7 +846,7 @@ impl<'tcx> OpaqueHiddenType<'tcx> {
other: &Self,
opaque_def_id: LocalDefId,
tcx: TyCtxt<'tcx>,
) -> Result<DiagnosticBuilder<'tcx>, ErrorGuaranteed> {
) -> Result<Diag<'tcx>, ErrorGuaranteed> {
if let Some(diag) = tcx
.sess
.dcx()

View file

@ -1,6 +1,6 @@
use rustc_data_structures::captures::Captures;
use rustc_data_structures::intern::Interned;
use rustc_errors::{DiagnosticArgValue, IntoDiagnosticArg};
use rustc_errors::{DiagArgValue, IntoDiagnosticArg};
use rustc_hir::def_id::DefId;
use rustc_hir::LangItem;
use rustc_span::Span;
@ -121,14 +121,14 @@ impl<'tcx> Predicate<'tcx> {
}
impl rustc_errors::IntoDiagnosticArg for Predicate<'_> {
fn into_diagnostic_arg(self) -> rustc_errors::DiagnosticArgValue {
rustc_errors::DiagnosticArgValue::Str(std::borrow::Cow::Owned(self.to_string()))
fn into_diagnostic_arg(self) -> rustc_errors::DiagArgValue {
rustc_errors::DiagArgValue::Str(std::borrow::Cow::Owned(self.to_string()))
}
}
impl rustc_errors::IntoDiagnosticArg for Clause<'_> {
fn into_diagnostic_arg(self) -> rustc_errors::DiagnosticArgValue {
rustc_errors::DiagnosticArgValue::Str(std::borrow::Cow::Owned(self.to_string()))
fn into_diagnostic_arg(self) -> rustc_errors::DiagArgValue {
rustc_errors::DiagArgValue::Str(std::borrow::Cow::Owned(self.to_string()))
}
}
@ -408,7 +408,7 @@ impl<'tcx> PolyTraitRef<'tcx> {
}
impl<'tcx> IntoDiagnosticArg for TraitRef<'tcx> {
fn into_diagnostic_arg(self) -> DiagnosticArgValue {
fn into_diagnostic_arg(self) -> DiagArgValue {
self.to_string().into_diagnostic_arg()
}
}
@ -454,7 +454,7 @@ impl<'tcx> ExistentialTraitRef<'tcx> {
}
impl<'tcx> IntoDiagnosticArg for ExistentialTraitRef<'tcx> {
fn into_diagnostic_arg(self) -> DiagnosticArgValue {
fn into_diagnostic_arg(self) -> DiagArgValue {
self.to_string().into_diagnostic_arg()
}
}

View file

@ -2719,7 +2719,7 @@ where
pub struct TraitRefPrintOnlyTraitPath<'tcx>(ty::TraitRef<'tcx>);
impl<'tcx> rustc_errors::IntoDiagnosticArg for TraitRefPrintOnlyTraitPath<'tcx> {
fn into_diagnostic_arg(self) -> rustc_errors::DiagnosticArgValue {
fn into_diagnostic_arg(self) -> rustc_errors::DiagArgValue {
self.to_string().into_diagnostic_arg()
}
}
@ -2736,7 +2736,7 @@ impl<'tcx> fmt::Debug for TraitRefPrintOnlyTraitPath<'tcx> {
pub struct TraitRefPrintSugared<'tcx>(ty::TraitRef<'tcx>);
impl<'tcx> rustc_errors::IntoDiagnosticArg for TraitRefPrintSugared<'tcx> {
fn into_diagnostic_arg(self) -> rustc_errors::DiagnosticArgValue {
fn into_diagnostic_arg(self) -> rustc_errors::DiagArgValue {
self.to_string().into_diagnostic_arg()
}
}

View file

@ -14,7 +14,7 @@ use crate::ty::{List, ParamEnv};
use hir::def::DefKind;
use rustc_data_structures::captures::Captures;
use rustc_errors::{
DiagnosticArgValue, DiagnosticMessage, ErrorGuaranteed, IntoDiagnosticArg, MultiSpan,
DiagArgValue, DiagnosticMessage, ErrorGuaranteed, IntoDiagnosticArg, MultiSpan,
};
use rustc_hir as hir;
use rustc_hir::def_id::DefId;
@ -1100,7 +1100,7 @@ impl<'tcx, T> IntoDiagnosticArg for Binder<'tcx, T>
where
T: IntoDiagnosticArg,
{
fn into_diagnostic_arg(self) -> DiagnosticArgValue {
fn into_diagnostic_arg(self) -> DiagArgValue {
self.value.into_diagnostic_arg()
}
}
@ -1310,7 +1310,7 @@ impl<'tcx> FnSig<'tcx> {
}
impl<'tcx> IntoDiagnosticArg for FnSig<'tcx> {
fn into_diagnostic_arg(self) -> DiagnosticArgValue {
fn into_diagnostic_arg(self) -> DiagArgValue {
self.to_string().into_diagnostic_arg()
}
}