Skip to content

lint unnecessary derefs #234

@birkenfeld

Description

@birkenfeld

I've seen uses of &*s where s is a String; this can be reduced to &s when calling a function that accepts &str.

Similarly, in the AST, I've seen (in clippy and racer) &**x or &*x where just x or &x is fine; call syntax will autoderef a &P<T> to a &T.

However, I don't really know yet how to do this in a general way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintArea: New lintsE-hardCall for participation: This a hard problem and requires more experience or effort to work onT-middleType: Probably requires verifiying types

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions