Trait rustc_errors::diagnostic::IntoDiagnosticArg
source · pub trait IntoDiagnosticArg {
fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>;
}
Expand description
Converts a value of a type into a DiagnosticArg
(typically a field of an IntoDiagnostic
struct). Implemented as a custom trait rather than From
so that it is implemented on the type
being converted rather than on DiagnosticArgValue
, which enables types from other rustc_*
crates to implement this.