Trait rustc_lint::LintContext[][src]

pub trait LintContext: Sized {
    type PassObject: LintPassObject;
    fn sess(&self) -> &Session;
fn lints(&self) -> &LintStore;
fn lookup<S: Into<MultiSpan>>(
        &self,
        lint: &'static Lint,
        span: Option<S>,
        decorate: impl for<'a> FnOnce(LintDiagnosticBuilder<'a>)
    ); fn lookup_with_diagnostics(
        &self,
        lint: &'static Lint,
        span: Option<impl Into<MultiSpan>>,
        decorate: impl for<'a> FnOnce(LintDiagnosticBuilder<'a>),
        diagnostic: BuiltinLintDiagnostics
    ) { ... }
fn struct_span_lint<S: Into<MultiSpan>>(
        &self,
        lint: &'static Lint,
        span: S,
        decorate: impl for<'a> FnOnce(LintDiagnosticBuilder<'a>)
    ) { ... }
fn lint(
        &self,
        lint: &'static Lint,
        decorate: impl for<'a> FnOnce(LintDiagnosticBuilder<'a>)
    ) { ... } }

Associated Types

Required methods

Provided methods

Emit a lint at the appropriate level, with no associated span.

Implementors