Skip to main content

Lint

Trait Lint 

pub trait Lint {
    // Required methods
    fn id(&self) -> &'static str;
    fn level(&self) -> Level;
    fn description(&self) -> &'static str;
    fn help(&self) -> &'static str;
}
Expand description

Static metadata shared by a lint’s diagnostics.

Required Methods§

fn id(&self) -> &'static str

Stable lint identifier.

fn level(&self) -> Level

Diagnostic level emitted by this lint.

fn description(&self) -> &'static str

Default diagnostic message.

fn help(&self) -> &'static str

Help URL associated with the lint.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§