Skip to content

len_without_is_empty requires allow in the wrong place. #1532

Closed
@sgrif

Description

@sgrif

When a struct fails the len_without_is_empty lint, the error span shows the definition of the len method. However, adding #[allow(len_without_is_empty)] on the method does nothing. Clippy wants it on the struct itself. I'd expect that the place to add #[allow] is always on the span shown in the error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thinggood first issueThese issues are a good way to get started with Clippy

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions