Skip to main content

## emit_lint_base

# Function emit_lint_base

Source

    pub fn emit_lint_base<'a, D: Diagnostic<'a, ()> + 'a>(
        sess: &'a Session,
        lint: &'static Lint,
        level_spec: impl Into<LevelSpec>,
        span: Option<MultiSpan>,
        decorate: D,
    )

Expand description

The innermost function for emitting lints implementing the `Diagnostic` trait.

If you are looking to implement a lint, look for higher level functions, for example:

- `TyCtxt::emit_node_span_lint`
- `LintContext::opt_span_lint`