Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use diagnostic_item instead of match_def_path in lints #76813

Closed
estebank opened this issue Sep 16, 2020 · 2 comments
Closed

Use diagnostic_item instead of match_def_path in lints #76813

estebank opened this issue Sep 16, 2020 · 2 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. C-cleanup Category: PRs that clean code up or issues documenting cleanup. P-low Low priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@estebank
Copy link
Contributor

In multiple lints we currently use match_def_path to perform checks for specific paths. We should be using is_diagnostic_item instead (which is newer than those lints).

@estebank estebank added C-cleanup Category: PRs that clean code up or issues documenting cleanup. P-low Low priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 16, 2020
@jyn514 jyn514 added A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. A-diagnostics Area: Messages for errors, warnings, and lints labels Sep 17, 2020
@RalfJung
Copy link
Member

See #66075 for some more things that could be turned into diagnostic items.

@JohnTitor
Copy link
Member

Looks like there's no use of match_def_path in the rustc (the work has been finished by #76910, clippy still uses it though), closing as completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. C-cleanup Category: PRs that clean code up or issues documenting cleanup. P-low Low priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants