diff options
author | Ekaterina Babshukova <[email protected]> | 2019-09-14 12:38:10 +0100 |
---|---|---|
committer | Ekaterina Babshukova <[email protected]> | 2019-10-22 21:47:31 +0100 |
commit | 11577288c23b1f2de1aaba0137c9c2d6344b9a92 (patch) | |
tree | 14b7da3cf3688fccc5994596fd21454896b3b0da /crates/ra_ide_api/src/name_ref_kind.rs | |
parent | c15ee97fff4324981d03f65210d794664c28f0e4 (diff) |
initial classify_name
Diffstat (limited to 'crates/ra_ide_api/src/name_ref_kind.rs')
-rw-r--r-- | crates/ra_ide_api/src/name_ref_kind.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_ide_api/src/name_ref_kind.rs b/crates/ra_ide_api/src/name_ref_kind.rs index 149585971..eb8caabfe 100644 --- a/crates/ra_ide_api/src/name_ref_kind.rs +++ b/crates/ra_ide_api/src/name_ref_kind.rs | |||
@@ -6,7 +6,7 @@ use test_utils::tested_by; | |||
6 | 6 | ||
7 | use crate::db::RootDatabase; | 7 | use crate::db::RootDatabase; |
8 | 8 | ||
9 | pub enum NameRefKind { | 9 | pub enum NameKind { |
10 | Method(hir::Function), | 10 | Method(hir::Function), |
11 | Macro(hir::MacroDef), | 11 | Macro(hir::MacroDef), |
12 | FieldAccess(hir::StructField), | 12 | FieldAccess(hir::StructField), |
@@ -22,8 +22,8 @@ pub(crate) fn classify_name_ref( | |||
22 | db: &RootDatabase, | 22 | db: &RootDatabase, |
23 | analyzer: &hir::SourceAnalyzer, | 23 | analyzer: &hir::SourceAnalyzer, |
24 | name_ref: &ast::NameRef, | 24 | name_ref: &ast::NameRef, |
25 | ) -> Option<NameRefKind> { | 25 | ) -> Option<NameKind> { |
26 | use NameRefKind::*; | 26 | use NameKind::*; |
27 | 27 | ||
28 | // Check if it is a method | 28 | // Check if it is a method |
29 | if let Some(method_call) = name_ref.syntax().parent().and_then(ast::MethodCallExpr::cast) { | 29 | if let Some(method_call) = name_ref.syntax().parent().and_then(ast::MethodCallExpr::cast) { |