Based on https://github.com/rust-lang/rust-clippy/pull/15520#discussion_r2372599748, with the following changes/additions: - No longer use the `Trait` enum for quickly filtering out irrelevant impls -- instead, check the `trait_of` basically right away: 1. pre-fetch `DefId`s of the relevant traits into the lint pass 2. reuse `cx.tcx.impl_trait_ref`'s output for the the `DefId` of the trait being implemented 3. compare those `DefId`s, which should be very cheap - Next, check whether `self_ty` implements the other relevant trait. - Pre-filter impl items in the same (lazy) iterator, but delay the proc-macro check as much as possible changelog: none Not auto-assigning since @blyxyas and/or @Jarcho will be the ones reviewing it: r? ghost |
||
|---|---|---|
| .. | ||
| test_utils | ||
| ui | ||
| ui-cargo | ||
| ui-internal | ||
| ui-toml | ||
| workspace_test | ||
| check-fmt.rs | ||
| clippy.toml | ||
| compile-test.rs | ||
| config-consistency.rs | ||
| config-metadata.rs | ||
| dogfood.rs | ||
| integration.rs | ||
| lint_message_convention.rs | ||
| missing-test-files.rs | ||
| no-profile-in-cargo-toml.rs | ||
| symbols-used.rs | ||
| versioncheck.rs | ||
| workspace.rs | ||