pub trait StructuredDiagnostic<'tcx> {
fn session(&self) -> &Session;
fn code(&self) -> DiagnosticId;
fn diagnostic_common(&self) -> DiagnosticBuilder<'tcx, ErrorGuaranteed>;
fn diagnostic(&self) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> { ... }
fn diagnostic_regular(
&self,
err: DiagnosticBuilder<'tcx, ErrorGuaranteed>
) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> { ... }
fn diagnostic_extended(
&self,
err: DiagnosticBuilder<'tcx, ErrorGuaranteed>
) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> { ... }
}