Skip to content

should_implement_trait triggers on from_iter methods even if FromIterator is implemented #6752

@bluss

Description

@bluss

FromIterator is not in the prelude, so crates that want to provide an easily accessible from_iter method might want to duplicate it as an inherent method (providing both FromIterator and an inherent method). For this reason, I think the lint fires incorrectly - it suggests implementing FromIterator (the trait is already implemented, too) and implicitly suggests removing the inherent method (style/convenience I would disagree with).

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't have

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions