diff options
Diffstat (limited to 'crates/ra_ide_api/src/references')
-rw-r--r-- | crates/ra_ide_api/src/references/classify.rs | 3 | ||||
-rw-r--r-- | crates/ra_ide_api/src/references/name_definition.rs | 6 |
2 files changed, 4 insertions, 5 deletions
diff --git a/crates/ra_ide_api/src/references/classify.rs b/crates/ra_ide_api/src/references/classify.rs index 227737ad2..5cea805ec 100644 --- a/crates/ra_ide_api/src/references/classify.rs +++ b/crates/ra_ide_api/src/references/classify.rs | |||
@@ -178,8 +178,7 @@ pub(crate) fn classify_name_ref( | |||
178 | Some(NameDefinition { kind, container, visibility }) | 178 | Some(NameDefinition { kind, container, visibility }) |
179 | } | 179 | } |
180 | PathResolution::SelfType(impl_block) => { | 180 | PathResolution::SelfType(impl_block) => { |
181 | let ty = impl_block.target_ty(db); | 181 | let kind = NameKind::SelfType(impl_block); |
182 | let kind = NameKind::SelfType(ty); | ||
183 | let container = impl_block.module(db); | 182 | let container = impl_block.module(db); |
184 | Some(NameDefinition { kind, container, visibility }) | 183 | Some(NameDefinition { kind, container, visibility }) |
185 | } | 184 | } |
diff --git a/crates/ra_ide_api/src/references/name_definition.rs b/crates/ra_ide_api/src/references/name_definition.rs index cf12db066..10d3a2364 100644 --- a/crates/ra_ide_api/src/references/name_definition.rs +++ b/crates/ra_ide_api/src/references/name_definition.rs | |||
@@ -4,8 +4,8 @@ | |||
4 | //! Note that the reference search is possible for not all of the classified items. | 4 | //! Note that the reference search is possible for not all of the classified items. |
5 | 5 | ||
6 | use hir::{ | 6 | use hir::{ |
7 | Adt, AssocItem, GenericParam, HasSource, Local, MacroDef, Module, ModuleDef, StructField, Ty, | 7 | Adt, AssocItem, GenericParam, HasSource, ImplBlock, Local, MacroDef, Module, ModuleDef, |
8 | VariantDef, | 8 | StructField, VariantDef, |
9 | }; | 9 | }; |
10 | use ra_syntax::{ast, ast::VisibilityOwner}; | 10 | use ra_syntax::{ast, ast::VisibilityOwner}; |
11 | 11 | ||
@@ -17,7 +17,7 @@ pub enum NameKind { | |||
17 | Field(StructField), | 17 | Field(StructField), |
18 | AssocItem(AssocItem), | 18 | AssocItem(AssocItem), |
19 | Def(ModuleDef), | 19 | Def(ModuleDef), |
20 | SelfType(Ty), | 20 | SelfType(ImplBlock), |
21 | Local(Local), | 21 | Local(Local), |
22 | GenericParam(GenericParam), | 22 | GenericParam(GenericParam), |
23 | } | 23 | } |