Skip to content

False negative in or_fn_call pertaining to nested ctors #4019

Closed
@Manishearth

Description

@Manishearth

#4018 fixes the main false positive in or_fn_call when it comes to things like .or(Some(foo)), keeping them exempt from the lint. However, in the process it also ignores .or(Some(foo.clone()), which it shouldn't.

We should have a visitor there that ensures that all expressions are either paths or ctors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thingE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions