diff options
Diffstat (limited to 'crates/ra_hir/src/impl_block.rs')
-rw-r--r-- | crates/ra_hir/src/impl_block.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/ra_hir/src/impl_block.rs b/crates/ra_hir/src/impl_block.rs index a3908048b..738c58fbe 100644 --- a/crates/ra_hir/src/impl_block.rs +++ b/crates/ra_hir/src/impl_block.rs | |||
@@ -90,9 +90,8 @@ impl ImplBlock { | |||
90 | pub fn target_trait(&self, db: &impl HirDatabase) -> Option<Trait> { | 90 | pub fn target_trait(&self, db: &impl HirDatabase) -> Option<Trait> { |
91 | if let Some(TypeRef::Path(path)) = self.target_trait_ref() { | 91 | if let Some(TypeRef::Path(path)) = self.target_trait_ref() { |
92 | let resolver = self.resolver(db); | 92 | let resolver = self.resolver(db); |
93 | if let Some(Resolution::Def { | 93 | if let Some(Resolution::Def(ModuleDef::Trait(tr))) = |
94 | def: ModuleDef::Trait(tr), | 94 | resolver.resolve_path(db, path).take_types() |
95 | }) = resolver.resolve_path(db, path).take_types() | ||
96 | { | 95 | { |
97 | return Some(tr); | 96 | return Some(tr); |
98 | } | 97 | } |
@@ -106,7 +105,7 @@ impl ImplBlock { | |||
106 | 105 | ||
107 | pub fn resolver(&self, db: &impl HirDatabase) -> Resolver { | 106 | pub fn resolver(&self, db: &impl HirDatabase) -> Resolver { |
108 | let r = self.module().resolver(db); | 107 | let r = self.module().resolver(db); |
109 | // FIXME: add generics | 108 | // TODO: add generics |
110 | let r = r.push_impl_block_scope(self.clone()); | 109 | let r = r.push_impl_block_scope(self.clone()); |
111 | r | 110 | r |
112 | } | 111 | } |