pub trait IntoDiagnostic<'a, G: EmissionGuarantee = ErrorGuaranteed> {
    // Required method
    fn into_diagnostic(self, dcx: &'a DiagCtxt) -> DiagnosticBuilder<'a, G>;
}
Expand description

Trait implemented by error types. This should not be implemented manually. Instead, use #[derive(Diagnostic)] – see rustc_macros::Diagnostic.

Required Methods§

source

fn into_diagnostic(self, dcx: &'a DiagCtxt) -> DiagnosticBuilder<'a, G>

Write out as a diagnostic out of DiagCtxt.

Implementations on Foreign Types§

source§

impl IntoDiagnostic<'_, !> for TargetDataLayoutErrors<'_>

source§

impl<'a, T, G> IntoDiagnostic<'a, G> for Spanned<T>
where T: IntoDiagnostic<'a, G>, G: EmissionGuarantee,

Implementors§