mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-07 09:13:07 +03:00
b25336b010
Currently, If `expected_def_id` and `another_trait_def_id` have their crate imported as ExternCrateSource::Path the method get_extern_crate_renamed_symbol() will return None for both, resulting in a false positive. This fixes the issue by using a slitly different approach, we use a predicate instead and do the comparison of the item names only when both crates are imported as ExternCrateSource::Extern and are direct dependencies of the LOCAL_CRATE, otherwise false is returned.