aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src')
-rw-r--r--crates/ra_ide/src/display/navigation_target.rs8
-rw-r--r--crates/ra_ide/src/goto_definition.rs8
-rw-r--r--crates/ra_ide/src/hover.rs3
-rw-r--r--crates/ra_ide/src/references.rs6
-rw-r--r--crates/ra_ide/src/syntax_highlighting.rs8
5 files changed, 14 insertions, 19 deletions
diff --git a/crates/ra_ide/src/display/navigation_target.rs b/crates/ra_ide/src/display/navigation_target.rs
index c9c14561a..d57451cc8 100644
--- a/crates/ra_ide/src/display/navigation_target.rs
+++ b/crates/ra_ide/src/display/navigation_target.rs
@@ -3,7 +3,7 @@
3use either::Either; 3use either::Either;
4use hir::{original_range, AssocItem, FieldSource, HasSource, InFile, ModuleSource}; 4use hir::{original_range, AssocItem, FieldSource, HasSource, InFile, ModuleSource};
5use ra_db::{FileId, SourceDatabase}; 5use ra_db::{FileId, SourceDatabase};
6use ra_ide_db::RootDatabase; 6use ra_ide_db::{defs::Definition, RootDatabase};
7use ra_syntax::{ 7use ra_syntax::{
8 ast::{self, DocCommentsOwner, NameOwner}, 8 ast::{self, DocCommentsOwner, NameOwner},
9 match_ast, AstNode, SmolStr, 9 match_ast, AstNode, SmolStr,
@@ -11,11 +11,7 @@ use ra_syntax::{
11 TextRange, 11 TextRange,
12}; 12};
13 13
14use crate::{ 14use crate::FileSymbol;
15 // expand::original_range,
16 references::Definition,
17 FileSymbol,
18};
19 15
20use super::short_label::ShortLabel; 16use super::short_label::ShortLabel;
21 17
diff --git a/crates/ra_ide/src/goto_definition.rs b/crates/ra_ide/src/goto_definition.rs
index 6f0dbe065..4a8107d60 100644
--- a/crates/ra_ide/src/goto_definition.rs
+++ b/crates/ra_ide/src/goto_definition.rs
@@ -1,7 +1,10 @@
1//! FIXME: write short doc here 1//! FIXME: write short doc here
2 2
3use hir::Semantics; 3use hir::Semantics;
4use ra_ide_db::{defs::classify_name, symbol_index, RootDatabase}; 4use ra_ide_db::{
5 defs::{classify_name, classify_name_ref},
6 symbol_index, RootDatabase,
7};
5use ra_syntax::{ 8use ra_syntax::{
6 ast::{self}, 9 ast::{self},
7 match_ast, AstNode, 10 match_ast, AstNode,
@@ -11,7 +14,6 @@ use ra_syntax::{
11 14
12use crate::{ 15use crate::{
13 display::{ToNav, TryToNav}, 16 display::{ToNav, TryToNav},
14 references::classify_name_ref,
15 FilePosition, NavigationTarget, RangeInfo, 17 FilePosition, NavigationTarget, RangeInfo,
16}; 18};
17 19
@@ -94,7 +96,7 @@ pub(crate) fn reference_definition(
94 96
95#[cfg(test)] 97#[cfg(test)]
96mod tests { 98mod tests {
97 use test_utils::{assert_eq_text, covers}; 99 use test_utils::assert_eq_text;
98 100
99 use crate::mock_analysis::analysis_and_position; 101 use crate::mock_analysis::analysis_and_position;
100 102
diff --git a/crates/ra_ide/src/hover.rs b/crates/ra_ide/src/hover.rs
index 26c8996bc..e9c682557 100644
--- a/crates/ra_ide/src/hover.rs
+++ b/crates/ra_ide/src/hover.rs
@@ -2,7 +2,7 @@
2 2
3use hir::{Adt, HasSource, HirDisplay, Semantics}; 3use hir::{Adt, HasSource, HirDisplay, Semantics};
4use ra_ide_db::{ 4use ra_ide_db::{
5 defs::{classify_name, Definition}, 5 defs::{classify_name, classify_name_ref, Definition},
6 RootDatabase, 6 RootDatabase,
7}; 7};
8use ra_syntax::{ 8use ra_syntax::{
@@ -14,7 +14,6 @@ use ra_syntax::{
14 14
15use crate::{ 15use crate::{
16 display::{macro_label, rust_code_markup, rust_code_markup_with_doc, ShortLabel}, 16 display::{macro_label, rust_code_markup, rust_code_markup_with_doc, ShortLabel},
17 references::classify_name_ref,
18 FilePosition, RangeInfo, 17 FilePosition, RangeInfo,
19}; 18};
20 19
diff --git a/crates/ra_ide/src/references.rs b/crates/ra_ide/src/references.rs
index bfc0c6047..67be3f6c9 100644
--- a/crates/ra_ide/src/references.rs
+++ b/crates/ra_ide/src/references.rs
@@ -15,7 +15,10 @@ mod search_scope;
15use hir::Semantics; 15use hir::Semantics;
16use once_cell::unsync::Lazy; 16use once_cell::unsync::Lazy;
17use ra_db::SourceDatabaseExt; 17use ra_db::SourceDatabaseExt;
18use ra_ide_db::RootDatabase; 18use ra_ide_db::{
19 defs::{classify_name, classify_name_ref, Definition},
20 RootDatabase,
21};
19use ra_prof::profile; 22use ra_prof::profile;
20use ra_syntax::{ 23use ra_syntax::{
21 algo::find_node_at_offset, 24 algo::find_node_at_offset,
@@ -27,7 +30,6 @@ use test_utils::tested_by;
27use crate::{display::TryToNav, FilePosition, FileRange, NavigationTarget, RangeInfo}; 30use crate::{display::TryToNav, FilePosition, FileRange, NavigationTarget, RangeInfo};
28 31
29pub(crate) use self::rename::rename; 32pub(crate) use self::rename::rename;
30pub(crate) use ra_ide_db::defs::{classify_name, classify_name_ref, Definition, NameRefClass};
31 33
32pub use self::search_scope::SearchScope; 34pub use self::search_scope::SearchScope;
33 35
diff --git a/crates/ra_ide/src/syntax_highlighting.rs b/crates/ra_ide/src/syntax_highlighting.rs
index 9e0ee2158..7fc94d3cd 100644
--- a/crates/ra_ide/src/syntax_highlighting.rs
+++ b/crates/ra_ide/src/syntax_highlighting.rs
@@ -7,7 +7,7 @@ mod tests;
7 7
8use hir::{Name, Semantics}; 8use hir::{Name, Semantics};
9use ra_ide_db::{ 9use ra_ide_db::{
10 defs::{classify_name, Definition, NameClass}, 10 defs::{classify_name, classify_name_ref, Definition, NameClass, NameRefClass},
11 RootDatabase, 11 RootDatabase,
12}; 12};
13use ra_prof::profile; 13use ra_prof::profile;
@@ -19,11 +19,7 @@ use ra_syntax::{
19}; 19};
20use rustc_hash::FxHashMap; 20use rustc_hash::FxHashMap;
21 21
22use crate::{ 22use crate::{call_info::call_info_for_token, Analysis, FileId};
23 call_info::call_info_for_token,
24 references::{classify_name_ref, NameRefClass},
25 Analysis, FileId,
26};
27 23
28pub(crate) use html::highlight_as_html; 24pub(crate) use html::highlight_as_html;
29pub use tags::{Highlight, HighlightModifier, HighlightModifiers, HighlightTag}; 25pub use tags::{Highlight, HighlightModifier, HighlightModifiers, HighlightTag};