Fix impl blocks with unresolved target trait being treated as inherent impls
This commit is contained in:
@@ -75,11 +75,13 @@ impl CrateImplBlocks {
|
|||||||
|
|
||||||
let target_ty = impl_block.target_ty(db);
|
let target_ty = impl_block.target_ty(db);
|
||||||
|
|
||||||
|
if impl_block.target_trait(db).is_some() {
|
||||||
if let Some(tr) = impl_block.target_trait_ref(db) {
|
if let Some(tr) = impl_block.target_trait_ref(db) {
|
||||||
self.impls_by_trait
|
self.impls_by_trait
|
||||||
.entry(tr.trait_)
|
.entry(tr.trait_)
|
||||||
.or_insert_with(Vec::new)
|
.or_insert_with(Vec::new)
|
||||||
.push((module.module_id, impl_id));
|
.push((module.module_id, impl_id));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if let Some(target_ty_fp) = TyFingerprint::for_impl(&target_ty) {
|
if let Some(target_ty_fp) = TyFingerprint::for_impl(&target_ty) {
|
||||||
self.impls
|
self.impls
|
||||||
|
|||||||
Reference in New Issue
Block a user