UNFULFILLED_LINT_EXPECTATIONS in rustc_lint::builtin - Rust
Description: The `unfulfilled_lint_expectations` lint detects when a lint expectation is unfulfilled.

Skip to main content

## UNFULFILLED_LINT_EXPECTATIONS

# Static UNFULFILLED_LINT_EXPECTATIONS

Source

    pub static UNFULFILLED_LINT_EXPECTATIONS: &'static Lint

Expand description

The `unfulfilled_lint_expectations` lint detects when a lint expectation is unfulfilled.

#### §Example

    #[expect(unused_variables)]
    let x = 10;
    println!("{}", x);

{{produces}}

#### §Explanation

The `#[expect]` attribute can be used to create a lint expectation. The expectation is fulfilled, if a `#[warn]` attribute at the same location would result in a lint emission. If the expectation is unfulfilled, because no lint was emitted, this lint will be emitted on the attribute.