Skip to content

needless_borrowed_reference is too opinionated #10245

Open
@Ralith

Description

@Ralith

Description

needless_borrowed_reference, newly enabled by default in 1.67 rejects patterns like &(ref x, ref y) and recommends the "match ergonomics" version instead. I intentionally avoid match ergonomics due to the confusion between values and references it introduces when reading code, and I'm not alone in that. By enabling this lint by default, clippy is forcing an unwanted stylistic change and making my code less readable. I would rather not have to go through every single project allowlisting this to unbreak CI, and I particularly don't want to have to do that repeatedly if more opinionated lints are liable to arise.

Version

No response

Additional Labels

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions