aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis/src/descriptors/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_analysis/src/descriptors/mod.rs')
-rw-r--r--crates/ra_analysis/src/descriptors/mod.rs21
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 @@
1pub(crate) mod function; 1pub(crate) mod function;
2pub(crate) mod module; 2pub(crate) mod module;
3mod path;
3 4
4use std::sync::Arc; 5use std::sync::Arc;
5 6
6use ra_syntax::{ 7use ra_syntax::{
7 ast::{self, AstNode, FnDefNode}, 8 ast::{self, FnDefNode},
8 TextRange, SmolStr, 9 TextRange,
9}; 10};
10 11
11use crate::{ 12use crate::{
@@ -18,6 +19,8 @@ use crate::{
18 Cancelable, 19 Cancelable,
19}; 20};
20 21
22pub(crate) use self::path::{Path, PathKind};
23
21salsa::query_group! { 24salsa::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)]
54pub(crate) struct Path {
55 kind: PathKind,
56 segments: Vec<SmolStr>,
57}
58
59#[derive(Debug, Clone, Copy, PartialEq, Eq)]
60pub(crate) enum PathKind {
61 Abs,
62 Self_,
63 Super,
64 Crate,
65}
66
67#[derive(Debug)] 56#[derive(Debug)]
68pub struct ReferenceDescriptor { 57pub struct ReferenceDescriptor {
69 pub range: TextRange, 58 pub range: TextRange,