diff options
Diffstat (limited to 'crates/ra_hir/src/source_analyzer.rs')
-rw-r--r-- | crates/ra_hir/src/source_analyzer.rs | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/crates/ra_hir/src/source_analyzer.rs b/crates/ra_hir/src/source_analyzer.rs index af2a8b57c..f3f1ed05a 100644 --- a/crates/ra_hir/src/source_analyzer.rs +++ b/crates/ra_hir/src/source_analyzer.rs | |||
@@ -24,8 +24,8 @@ use ra_syntax::{ | |||
24 | }; | 24 | }; |
25 | 25 | ||
26 | use crate::{ | 26 | use crate::{ |
27 | db::HirDatabase, Adt, Const, EnumVariant, Function, Local, MacroDef, ModPath, ModuleDef, Path, | 27 | db::HirDatabase, semantics::PathResolution, Adt, Const, EnumVariant, Function, Local, MacroDef, |
28 | PathKind, Static, Struct, Trait, Type, TypeAlias, TypeParam, | 28 | ModPath, ModuleDef, Path, PathKind, Static, Struct, Trait, Type, TypeAlias, TypeParam, |
29 | }; | 29 | }; |
30 | 30 | ||
31 | /// `SourceAnalyzer` is a convenience wrapper which exposes HIR API in terms of | 31 | /// `SourceAnalyzer` is a convenience wrapper which exposes HIR API in terms of |
@@ -40,19 +40,6 @@ pub(crate) struct SourceAnalyzer { | |||
40 | scopes: Option<Arc<ExprScopes>>, | 40 | scopes: Option<Arc<ExprScopes>>, |
41 | } | 41 | } |
42 | 42 | ||
43 | #[derive(Debug, Clone, PartialEq, Eq)] | ||
44 | pub enum PathResolution { | ||
45 | /// An item | ||
46 | Def(crate::ModuleDef), | ||
47 | /// A local binding (only value namespace) | ||
48 | Local(Local), | ||
49 | /// A generic parameter | ||
50 | TypeParam(TypeParam), | ||
51 | SelfType(crate::ImplDef), | ||
52 | Macro(MacroDef), | ||
53 | AssocItem(crate::AssocItem), | ||
54 | } | ||
55 | |||
56 | impl SourceAnalyzer { | 43 | impl SourceAnalyzer { |
57 | pub(crate) fn new_for_body( | 44 | pub(crate) fn new_for_body( |
58 | db: &impl HirDatabase, | 45 | db: &impl HirDatabase, |