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, ()>)
    ) { ... } }

Required Associated Types

Required Methods

Provided Methods

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

Implementors