-
Notifications
You must be signed in to change notification settings - Fork 1.8k
use get_diagnostic_item
in even more places
#15528
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
Conversation
While working on this, I've noticed two common patterns:
And I wonder whether I should try making this into internal lints, even if without the suggestions at first? |
avoids bounds checks
`None` is the fallback case anyway
to be able to reuse `did`
`trait_name` can only be _one_ of those at the same time
c6282ae
to
3c3dc6d
Compare
Why not? I also systematically suggest using the more efficient form when I do reviews, but I didn't go through the existing code. If this is not too much work, you might attempt it. |
continuation of #15519, see there for the commit structure
AFAICT this finally resolves #7784
changelog: none