Skip to content

Allow simultaneous usage of EarlyLintPass and LateLintPass #1908

@CleverWild

Description

@CleverWild

I've seen this pattern in some clippy lints, and I don't have any idea what the reason for this "restriction" is.

Why do I ask?
I am writing now a lint that checks the path value from dropshot::endpoint which is proc-macro-attribute and warns when a user tries to use bad patterns, e.g., passes the ID value in json instead of the path. In EarlyLintPass I have access to ast, where the attribute is located. But I don't have access to hir type info to check argument types for some pattern similar to passing the ID value in json. Whereas LateLintPass has the opposite situation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions