Skip to main content

LintPolicy

Trait LintPolicy 

pub trait LintPolicy: Send + Sync {
    // Required methods
    fn is_lint_enabled(&self, id: &str) -> bool;
    fn is_lint_suppressed(&self, id: &str, span: Span) -> bool;
}
Expand description

Toolchain policy applied while emitting lint diagnostics.

Required Methods§

fn is_lint_enabled(&self, id: &str) -> bool

Returns whether this lint is enabled for the current source.

fn is_lint_suppressed(&self, id: &str, span: Span) -> bool

Returns whether an otherwise enabled lint is suppressed at span.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§