diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_ide/src/display/navigation_target.rs | 8 | ||||
-rw-r--r-- | crates/ra_ide/src/goto_definition.rs | 8 | ||||
-rw-r--r-- | crates/ra_ide/src/hover.rs | 3 | ||||
-rw-r--r-- | crates/ra_ide/src/references.rs | 6 | ||||
-rw-r--r-- | crates/ra_ide/src/syntax_highlighting.rs | 8 |
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 @@ | |||
3 | use either::Either; | 3 | use either::Either; |
4 | use hir::{original_range, AssocItem, FieldSource, HasSource, InFile, ModuleSource}; | 4 | use hir::{original_range, AssocItem, FieldSource, HasSource, InFile, ModuleSource}; |
5 | use ra_db::{FileId, SourceDatabase}; | 5 | use ra_db::{FileId, SourceDatabase}; |
6 | use ra_ide_db::RootDatabase; | 6 | use ra_ide_db::{defs::Definition, RootDatabase}; |
7 | use ra_syntax::{ | 7 | use 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 | ||
14 | use crate::{ | 14 | use crate::FileSymbol; |
15 | // expand::original_range, | ||
16 | references::Definition, | ||
17 | FileSymbol, | ||
18 | }; | ||
19 | 15 | ||
20 | use super::short_label::ShortLabel; | 16 | use 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 | ||
3 | use hir::Semantics; | 3 | use hir::Semantics; |
4 | use ra_ide_db::{defs::classify_name, symbol_index, RootDatabase}; | 4 | use ra_ide_db::{ |
5 | defs::{classify_name, classify_name_ref}, | ||
6 | symbol_index, RootDatabase, | ||
7 | }; | ||
5 | use ra_syntax::{ | 8 | use 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 | ||
12 | use crate::{ | 15 | use 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)] |
96 | mod tests { | 98 | mod 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 | ||
3 | use hir::{Adt, HasSource, HirDisplay, Semantics}; | 3 | use hir::{Adt, HasSource, HirDisplay, Semantics}; |
4 | use ra_ide_db::{ | 4 | use ra_ide_db::{ |
5 | defs::{classify_name, Definition}, | 5 | defs::{classify_name, classify_name_ref, Definition}, |
6 | RootDatabase, | 6 | RootDatabase, |
7 | }; | 7 | }; |
8 | use ra_syntax::{ | 8 | use ra_syntax::{ |
@@ -14,7 +14,6 @@ use ra_syntax::{ | |||
14 | 14 | ||
15 | use crate::{ | 15 | use 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; | |||
15 | use hir::Semantics; | 15 | use hir::Semantics; |
16 | use once_cell::unsync::Lazy; | 16 | use once_cell::unsync::Lazy; |
17 | use ra_db::SourceDatabaseExt; | 17 | use ra_db::SourceDatabaseExt; |
18 | use ra_ide_db::RootDatabase; | 18 | use ra_ide_db::{ |
19 | defs::{classify_name, classify_name_ref, Definition}, | ||
20 | RootDatabase, | ||
21 | }; | ||
19 | use ra_prof::profile; | 22 | use ra_prof::profile; |
20 | use ra_syntax::{ | 23 | use ra_syntax::{ |
21 | algo::find_node_at_offset, | 24 | algo::find_node_at_offset, |
@@ -27,7 +30,6 @@ use test_utils::tested_by; | |||
27 | use crate::{display::TryToNav, FilePosition, FileRange, NavigationTarget, RangeInfo}; | 30 | use crate::{display::TryToNav, FilePosition, FileRange, NavigationTarget, RangeInfo}; |
28 | 31 | ||
29 | pub(crate) use self::rename::rename; | 32 | pub(crate) use self::rename::rename; |
30 | pub(crate) use ra_ide_db::defs::{classify_name, classify_name_ref, Definition, NameRefClass}; | ||
31 | 33 | ||
32 | pub use self::search_scope::SearchScope; | 34 | pub 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 | ||
8 | use hir::{Name, Semantics}; | 8 | use hir::{Name, Semantics}; |
9 | use ra_ide_db::{ | 9 | use 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 | }; |
13 | use ra_prof::profile; | 13 | use ra_prof::profile; |
@@ -19,11 +19,7 @@ use ra_syntax::{ | |||
19 | }; | 19 | }; |
20 | use rustc_hash::FxHashMap; | 20 | use rustc_hash::FxHashMap; |
21 | 21 | ||
22 | use crate::{ | 22 | use 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 | ||
28 | pub(crate) use html::highlight_as_html; | 24 | pub(crate) use html::highlight_as_html; |
29 | pub use tags::{Highlight, HighlightModifier, HighlightModifiers, HighlightTag}; | 25 | pub use tags::{Highlight, HighlightModifier, HighlightModifiers, HighlightTag}; |