aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_assists/src/lib.rs')
-rw-r--r--crates/ra_assists/src/lib.rs10
1 files changed, 3 insertions, 7 deletions
diff --git a/crates/ra_assists/src/lib.rs b/crates/ra_assists/src/lib.rs
index 381a51df6..9e4ebec47 100644
--- a/crates/ra_assists/src/lib.rs
+++ b/crates/ra_assists/src/lib.rs
@@ -14,9 +14,9 @@ mod test_db;
14pub mod ast_transform; 14pub mod ast_transform;
15 15
16use either::Either; 16use either::Either;
17use hir::{db::HirDatabase, InFile, ModPath, Module}; 17use hir::{db::HirDatabase, ModuleDef};
18use ra_db::FileRange; 18use ra_db::FileRange;
19use ra_syntax::{ast::NameRef, TextRange, TextUnit}; 19use ra_syntax::{TextRange, TextUnit};
20use ra_text_edit::TextEdit; 20use ra_text_edit::TextEdit;
21 21
22pub(crate) use crate::assist_ctx::{Assist, AssistCtx}; 22pub(crate) use crate::assist_ctx::{Assist, AssistCtx};
@@ -85,11 +85,7 @@ where
85/// accessible from the ra_assists crate. 85/// accessible from the ra_assists crate.
86pub trait ImportsLocator { 86pub trait ImportsLocator {
87 /// Finds all imports for the given name and the module that contains this name. 87 /// Finds all imports for the given name and the module that contains this name.
88 fn find_imports( 88 fn find_imports(&mut self, name_to_import: &str) -> Vec<ModuleDef>;
89 &mut self,
90 name_to_import: InFile<&NameRef>,
91 module_with_name_to_import: Module,
92 ) -> Option<Vec<ModPath>>;
93} 89}
94 90
95/// Return all the assists applicable at the given position 91/// Return all the assists applicable at the given position