Skip to content

Detect when paths in src/utils/path.rs become outdated #6274

@Aaron1011

Description

@Aaron1011

Clippy lists a lot of different paths in https://github.com/rust-lang/rust-clippy/blob/084b203988e04bcf89d3b2d6bbc77b65ecfab553/clippy_lints/src/utils/paths.rs, which are represented as strings. If one of these becomes invalid due to a compiler refactoring, Clippy will continue to compile - however, the behavior of lints may change, since the path will never match anything.

It would be useful to validate that all of the paths are valid (if the crate at the beginning of the path is loaded). I'm not sure how difficult this would be - I think we would need access to the resolver before we run any lints.

I came across this in rust-lang/rust#75534 - I moved the rustc Lint type, which caused an internal clippy lint to stop firing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions