pub trait IntoDiagnostic<'a, G: EmissionGuarantee = ErrorGuaranteed> {
// Required method
fn into_diagnostic(
self,
dcx: &'a DiagCtxt,
level: Level
) -> DiagnosticBuilder<'a, G>;
}
Expand description
Trait implemented by error types. This is rarely implemented manually. Instead, use
#[derive(Diagnostic)]
– see rustc_macros::Diagnostic.
Required Methods§
sourcefn into_diagnostic(
self,
dcx: &'a DiagCtxt,
level: Level
) -> DiagnosticBuilder<'a, G>
fn into_diagnostic( self, dcx: &'a DiagCtxt, level: Level ) -> DiagnosticBuilder<'a, G>
Write out as a diagnostic out of DiagCtxt
.