aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_assists/src/assists/auto_import.rs4
-rw-r--r--crates/ra_hir/src/lib.rs1
-rw-r--r--crates/ra_ide_db/src/imports_locator.rs4
3 files changed, 4 insertions, 5 deletions
diff --git a/crates/ra_assists/src/assists/auto_import.rs b/crates/ra_assists/src/assists/auto_import.rs
index f16b08c43..10c4b7d7c 100644
--- a/crates/ra_assists/src/assists/auto_import.rs
+++ b/crates/ra_assists/src/assists/auto_import.rs
@@ -8,7 +8,7 @@ use crate::{
8 assist_ctx::{ActionBuilder, Assist, AssistCtx}, 8 assist_ctx::{ActionBuilder, Assist, AssistCtx},
9 auto_import_text_edit, AssistId, 9 auto_import_text_edit, AssistId,
10}; 10};
11use ra_ide_db::imports_locator::ImportsLocatorIde; 11use ra_ide_db::imports_locator::ImportsLocator;
12 12
13// Assist: auto_import 13// Assist: auto_import
14// 14//
@@ -52,7 +52,7 @@ pub(crate) fn auto_import(ctx: AssistCtx) -> Option<Assist> {
52 return None; 52 return None;
53 } 53 }
54 54
55 let mut imports_locator = ImportsLocatorIde::new(ctx.db); 55 let mut imports_locator = ImportsLocator::new(ctx.db);
56 56
57 let proposed_imports = imports_locator 57 let proposed_imports = imports_locator
58 .find_imports(&name_to_import) 58 .find_imports(&name_to_import)
diff --git a/crates/ra_hir/src/lib.rs b/crates/ra_hir/src/lib.rs
index ea06a4a58..86e422779 100644
--- a/crates/ra_hir/src/lib.rs
+++ b/crates/ra_hir/src/lib.rs
@@ -56,7 +56,6 @@ pub use hir_def::{
56 nameres::ModuleSource, 56 nameres::ModuleSource,
57 path::{ModPath, Path, PathKind}, 57 path::{ModPath, Path, PathKind},
58 type_ref::Mutability, 58 type_ref::Mutability,
59 ModuleDefId, // FIXME this is exposed and should be used for implementing the `TestImportsLocator` in `ra_assists` only, should be removed later along with the trait and the implementation.
60}; 59};
61pub use hir_expand::{ 60pub use hir_expand::{
62 name::{name, Name}, 61 name::{name, Name},
diff --git a/crates/ra_ide_db/src/imports_locator.rs b/crates/ra_ide_db/src/imports_locator.rs
index d77fc53f3..401b8ac0b 100644
--- a/crates/ra_ide_db/src/imports_locator.rs
+++ b/crates/ra_ide_db/src/imports_locator.rs
@@ -12,11 +12,11 @@ use crate::{
12 RootDatabase, 12 RootDatabase,
13}; 13};
14 14
15pub struct ImportsLocatorIde<'a> { 15pub struct ImportsLocator<'a> {
16 source_binder: SourceBinder<'a, RootDatabase>, 16 source_binder: SourceBinder<'a, RootDatabase>,
17} 17}
18 18
19impl<'a> ImportsLocatorIde<'a> { 19impl<'a> ImportsLocator<'a> {
20 pub fn new(db: &'a RootDatabase) -> Self { 20 pub fn new(db: &'a RootDatabase) -> Self {
21 Self { source_binder: SourceBinder::new(db) } 21 Self { source_binder: SourceBinder::new(db) }
22 } 22 }