rustc_lint_defs::builtin

Static UNFULFILLED_LINT_EXPECTATIONS

source
pub static UNFULFILLED_LINT_EXPECTATIONS: &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.