aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide')
-rw-r--r--crates/ra_ide/src/references.rs21
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
32pub(crate) use self::rename::rename; 32pub(crate) use self::rename::rename;
33 33
34pub use ra_ide_db::search::SearchScope; 34pub use ra_ide_db::search::{Reference, ReferenceAccess, ReferenceKind, SearchScope};
35 35
36#[derive(Debug, Clone)] 36#[derive(Debug, Clone)]
37pub struct ReferenceSearchResult { 37pub 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)]
50pub struct Reference {
51 pub file_range: FileRange,
52 pub kind: ReferenceKind,
53 pub access: Option<ReferenceAccess>,
54}
55
56#[derive(Debug, Clone, PartialEq)]
57pub enum ReferenceKind {
58 StructLiteral,
59 Other,
60}
61
62#[derive(Debug, Copy, Clone, PartialEq)]
63pub enum ReferenceAccess {
64 Read,
65 Write,
66}
67
68impl ReferenceSearchResult { 49impl ReferenceSearchResult {
69 pub fn declaration(&self) -> &Declaration { 50 pub fn declaration(&self) -> &Declaration {
70 &self.declaration 51 &self.declaration