-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Resolve duplicate diag message for: tests/ui/renamed_builtin_attr.rs #12960
base: master
Are you sure you want to change the base?
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Manishearth (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
This one is a bit of an edge case compared to the others since it's not being caused by a single lint. Since the deduplication here is similar to what the diagnostic infrastructure is doing internally it might be worth keeping this one as a duplicate emitter |
r? @Alexendoo |
Hi @Alexendoo. The only thing worth mentioning is that currently, without this fix, each deprecated attribute will be evaluated 4x which means 4 messages per attribute will be emitted. With this fix it will only be emitted once. More of a cosmetic thing but wanted to mention just in case. |
☔ The latest upstream changes (presumably #12999) made this pull request unmergeable. Please resolve the merge conflicts. |
UI wise duplicates are hidden by default, we set rust-clippy/clippy_lints/src/attrs/mod.rs Line 532 in 68a799a
so it's only happening once per attribute |
@rustbot author |
This PR is to resolve duplicate diag messages for the renamed_builtin_attr UI test which is related to: #12379
This was caused by multiple functions calling the get_attr function resulting in the deprecated attribute to be reevaluated.
I added a state to the attr.rs file to track if the warning has already been emitted and skip the evaluation if the attribute warning has already been emitted.
changelog: [renamed_builtin_attr]: Fix duplicate diagnostics