aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/code_model.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/code_model.rs')
-rw-r--r--crates/ra_hir/src/code_model.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs
index 9e7a1deec..50e6409b1 100644
--- a/crates/ra_hir/src/code_model.rs
+++ b/crates/ra_hir/src/code_model.rs
@@ -740,10 +740,6 @@ impl Trait {
740 db.trait_data(self.id).items.iter().map(|(_name, it)| (*it).into()).collect() 740 db.trait_data(self.id).items.iter().map(|(_name, it)| (*it).into()).collect()
741 } 741 }
742 742
743 pub fn associated_type_by_name(self, db: &impl DefDatabase, name: &Name) -> Option<TypeAlias> {
744 db.trait_data(self.id).associated_type_by_name(name).map(TypeAlias::from)
745 }
746
747 pub fn associated_type_by_name_including_super_traits( 743 pub fn associated_type_by_name_including_super_traits(
748 self, 744 self,
749 db: &impl HirDatabase, 745 db: &impl HirDatabase,
@@ -751,8 +747,8 @@ impl Trait {
751 ) -> Option<TypeAlias> { 747 ) -> Option<TypeAlias> {
752 all_super_traits(db, self.id) 748 all_super_traits(db, self.id)
753 .into_iter() 749 .into_iter()
754 .map(Trait::from) 750 .find_map(|t| db.trait_data(t).associated_type_by_name(name))
755 .find_map(|t| t.associated_type_by_name(db, name)) 751 .map(TypeAlias::from)
756 } 752 }
757 753
758 pub fn trait_ref(self, db: &impl HirDatabase) -> TraitRef { 754 pub fn trait_ref(self, db: &impl HirDatabase) -> TraitRef {