diff options
Diffstat (limited to 'crates/ra_analysis/src/descriptors/mod.rs')
-rw-r--r-- | crates/ra_analysis/src/descriptors/mod.rs | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/crates/ra_analysis/src/descriptors/mod.rs b/crates/ra_analysis/src/descriptors/mod.rs index 82658211f..e6225479d 100644 --- a/crates/ra_analysis/src/descriptors/mod.rs +++ b/crates/ra_analysis/src/descriptors/mod.rs | |||
@@ -1,11 +1,12 @@ | |||
1 | pub(crate) mod function; | 1 | pub(crate) mod function; |
2 | pub(crate) mod module; | 2 | pub(crate) mod module; |
3 | mod path; | ||
3 | 4 | ||
4 | use std::sync::Arc; | 5 | use std::sync::Arc; |
5 | 6 | ||
6 | use ra_syntax::{ | 7 | use ra_syntax::{ |
7 | ast::{self, AstNode, FnDefNode}, | 8 | ast::{self, FnDefNode}, |
8 | TextRange, SmolStr, | 9 | TextRange, |
9 | }; | 10 | }; |
10 | 11 | ||
11 | use crate::{ | 12 | use crate::{ |
@@ -18,6 +19,8 @@ use crate::{ | |||
18 | Cancelable, | 19 | Cancelable, |
19 | }; | 20 | }; |
20 | 21 | ||
22 | pub(crate) use self::path::{Path, PathKind}; | ||
23 | |||
21 | salsa::query_group! { | 24 | salsa::query_group! { |
22 | pub(crate) trait DescriptorDatabase: SyntaxDatabase + IdDatabase { | 25 | pub(crate) trait DescriptorDatabase: SyntaxDatabase + IdDatabase { |
23 | fn fn_scopes(fn_id: FnId) -> Arc<FnScopes> { | 26 | fn fn_scopes(fn_id: FnId) -> Arc<FnScopes> { |
@@ -50,20 +53,6 @@ salsa::query_group! { | |||
50 | } | 53 | } |
51 | } | 54 | } |
52 | 55 | ||
53 | #[derive(Debug, Clone, PartialEq, Eq)] | ||
54 | pub(crate) struct Path { | ||
55 | kind: PathKind, | ||
56 | segments: Vec<SmolStr>, | ||
57 | } | ||
58 | |||
59 | #[derive(Debug, Clone, Copy, PartialEq, Eq)] | ||
60 | pub(crate) enum PathKind { | ||
61 | Abs, | ||
62 | Self_, | ||
63 | Super, | ||
64 | Crate, | ||
65 | } | ||
66 | |||
67 | #[derive(Debug)] | 56 | #[derive(Debug)] |
68 | pub struct ReferenceDescriptor { | 57 | pub struct ReferenceDescriptor { |
69 | pub range: TextRange, | 58 | pub range: TextRange, |