Skip to content

E0424 The self keyword was used in a static method. #59782

Closed
@gnzlbg

Description

@gnzlbg

E0424 states:

The self keyword was used in a static method.

But static method is probably wrong, it should just say a non-method (I don't think we have a technical term to refer to methods that do not take an arbitrary self type as first argument).

It continues with:

Please check if the method's argument list should have contained self, &self, or &mut self (in case you didn't want to create a static method), and add it if so.

That's outdated, &mut Pin<Self> (and others) work too. So this should be updated to cover arbitrary Self types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions