fulfill_or_allowed in clippy_utils - Rust
Description: Returns `true` if the lint is `#[allow]`ed or `#[expect]`ed at any of the `ids`, fulfilling all of the expectations in `ids`

Skip to main content

## fulfill_or_allowed

# Function fulfill_or_allowed

Source

    pub fn fulfill_or_allowed(
        cx: &LateContext<'_>,
        lint: &'static Lint,
        ids: impl IntoIterator<Item = HirId>,
    ) -> bool

Expand description

Returns `true` if the lint is `#[allow]`ed or `#[expect]`ed at any of the `ids`, fulfilling all of the expectations in `ids`

This should only be used when the lint would otherwise be emitted, for a way to check if a lint is allowed early to skip work see `is_lint_allowed`

To emit at a lint at a different context than the one current see `span_lint_hir` or `span_lint_hir_and_then`