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 |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| README.md | ||