emit_lint_base in rustc_middle::lint - Rust
Description: The innermost function for emitting lints implementing the `trait@Diagnostic` trait.

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: LevelAndSource,
        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`