From 53cab1cd21aa817a3588e64415a26b507ca00edd Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 3 Mar 2020 18:54:39 +0100 Subject: Fix imports --- crates/ra_ide/src/display/navigation_target.rs | 8 ++------ crates/ra_ide/src/goto_definition.rs | 8 +++++--- crates/ra_ide/src/hover.rs | 3 +-- crates/ra_ide/src/references.rs | 6 ++++-- crates/ra_ide/src/syntax_highlighting.rs | 8 ++------ 5 files changed, 14 insertions(+), 19 deletions(-) (limited to 'crates') 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 @@ use either::Either; use hir::{original_range, AssocItem, FieldSource, HasSource, InFile, ModuleSource}; use ra_db::{FileId, SourceDatabase}; -use ra_ide_db::RootDatabase; +use ra_ide_db::{defs::Definition, RootDatabase}; use ra_syntax::{ ast::{self, DocCommentsOwner, NameOwner}, match_ast, AstNode, SmolStr, @@ -11,11 +11,7 @@ use ra_syntax::{ TextRange, }; -use crate::{ - // expand::original_range, - references::Definition, - FileSymbol, -}; +use crate::FileSymbol; use super::short_label::ShortLabel; 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 @@ //! FIXME: write short doc here use hir::Semantics; -use ra_ide_db::{defs::classify_name, symbol_index, RootDatabase}; +use ra_ide_db::{ + defs::{classify_name, classify_name_ref}, + symbol_index, RootDatabase, +}; use ra_syntax::{ ast::{self}, match_ast, AstNode, @@ -11,7 +14,6 @@ use ra_syntax::{ use crate::{ display::{ToNav, TryToNav}, - references::classify_name_ref, FilePosition, NavigationTarget, RangeInfo, }; @@ -94,7 +96,7 @@ pub(crate) fn reference_definition( #[cfg(test)] mod tests { - use test_utils::{assert_eq_text, covers}; + use test_utils::assert_eq_text; use crate::mock_analysis::analysis_and_position; 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 @@ use hir::{Adt, HasSource, HirDisplay, Semantics}; use ra_ide_db::{ - defs::{classify_name, Definition}, + defs::{classify_name, classify_name_ref, Definition}, RootDatabase, }; use ra_syntax::{ @@ -14,7 +14,6 @@ use ra_syntax::{ use crate::{ display::{macro_label, rust_code_markup, rust_code_markup_with_doc, ShortLabel}, - references::classify_name_ref, FilePosition, RangeInfo, }; 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; use hir::Semantics; use once_cell::unsync::Lazy; use ra_db::SourceDatabaseExt; -use ra_ide_db::RootDatabase; +use ra_ide_db::{ + defs::{classify_name, classify_name_ref, Definition}, + RootDatabase, +}; use ra_prof::profile; use ra_syntax::{ algo::find_node_at_offset, @@ -27,7 +30,6 @@ use test_utils::tested_by; use crate::{display::TryToNav, FilePosition, FileRange, NavigationTarget, RangeInfo}; pub(crate) use self::rename::rename; -pub(crate) use ra_ide_db::defs::{classify_name, classify_name_ref, Definition, NameRefClass}; pub use self::search_scope::SearchScope; 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; use hir::{Name, Semantics}; use ra_ide_db::{ - defs::{classify_name, Definition, NameClass}, + defs::{classify_name, classify_name_ref, Definition, NameClass, NameRefClass}, RootDatabase, }; use ra_prof::profile; @@ -19,11 +19,7 @@ use ra_syntax::{ }; use rustc_hash::FxHashMap; -use crate::{ - call_info::call_info_for_token, - references::{classify_name_ref, NameRefClass}, - Analysis, FileId, -}; +use crate::{call_info::call_info_for_token, Analysis, FileId}; pub(crate) use html::highlight_as_html; pub use tags::{Highlight, HighlightModifier, HighlightModifiers, HighlightTag}; -- cgit v1.2.3