diff options
author | Aleksey Kladov <[email protected]> | 2020-03-04 11:06:37 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-03-04 11:22:06 +0000 |
commit | 1874b6738ab4b849e5cbcb37fe2019192f950e5e (patch) | |
tree | 63016f6cfcfe7604cbd2be8ea2f2dd964ce1f4da /crates/ra_ide/src | |
parent | a549da7e3ea66fd336de331c7c8d62b186051521 (diff) |
Move ReferenceKind
Diffstat (limited to 'crates/ra_ide/src')
-rw-r--r-- | crates/ra_ide/src/references.rs | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/crates/ra_ide/src/references.rs b/crates/ra_ide/src/references.rs index 6fd46c52d..c797918b0 100644 --- a/crates/ra_ide/src/references.rs +++ b/crates/ra_ide/src/references.rs | |||
@@ -31,7 +31,7 @@ use crate::{display::TryToNav, FilePosition, FileRange, NavigationTarget, RangeI | |||
31 | 31 | ||
32 | pub(crate) use self::rename::rename; | 32 | pub(crate) use self::rename::rename; |
33 | 33 | ||
34 | pub use ra_ide_db::search::SearchScope; | 34 | pub use ra_ide_db::search::{Reference, ReferenceAccess, ReferenceKind, SearchScope}; |
35 | 35 | ||
36 | #[derive(Debug, Clone)] | 36 | #[derive(Debug, Clone)] |
37 | pub struct ReferenceSearchResult { | 37 | pub struct ReferenceSearchResult { |
@@ -46,25 +46,6 @@ pub struct Declaration { | |||
46 | pub access: Option<ReferenceAccess>, | 46 | pub access: Option<ReferenceAccess>, |
47 | } | 47 | } |
48 | 48 | ||
49 | #[derive(Debug, Clone)] | ||
50 | pub struct Reference { | ||
51 | pub file_range: FileRange, | ||
52 | pub kind: ReferenceKind, | ||
53 | pub access: Option<ReferenceAccess>, | ||
54 | } | ||
55 | |||
56 | #[derive(Debug, Clone, PartialEq)] | ||
57 | pub enum ReferenceKind { | ||
58 | StructLiteral, | ||
59 | Other, | ||
60 | } | ||
61 | |||
62 | #[derive(Debug, Copy, Clone, PartialEq)] | ||
63 | pub enum ReferenceAccess { | ||
64 | Read, | ||
65 | Write, | ||
66 | } | ||
67 | |||
68 | impl ReferenceSearchResult { | 49 | impl ReferenceSearchResult { |
69 | pub fn declaration(&self) -> &Declaration { | 50 | pub fn declaration(&self) -> &Declaration { |
70 | &self.declaration | 51 | &self.declaration |