pub trait DecorateLint<'a, G: EmissionGuarantee> {
    // Required methods
    fn decorate_lint<'b>(
        self,
        diag: &'b mut DiagnosticBuilder<'a, G>
    ) -> &'b mut DiagnosticBuilder<'a, G>;
    fn msg(&self) -> DiagnosticMessage;
}
Expand description

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

Required Methods§

source

fn decorate_lint<'b>( self, diag: &'b mut DiagnosticBuilder<'a, G> ) -> &'b mut DiagnosticBuilder<'a, G>

Decorate and emit a lint.

source

fn msg(&self) -> DiagnosticMessage

Implementors§