Skip to content

Suggest changing *x to x in toplevel_ref_arg #406

Open
@llogiq

Description

@llogiq

If we have a toplevel ref argument, toplevel_ref_arg will suggest removing the ref (it should perhaps also propose removing mut if it's there). However, this will lead to error if the argument is dereferenced within the function.

At the very least, the message should note that dereferences can lead to errors. Better yet would be to find all those instances and suggest removing the *.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messages

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions