Skip to content

Commit 918115c

Browse files
Merge #3036
3036: Remove the leftovers after ImportLocator removal r=matklad a=SomeoneToIgnore Follow the FIXME's suggestion (https://github.com/rust-analyzer/rust-analyzer/pull/3034/files#diff-001b3b1412c33fee802c22b0f848dcd7L237) and remove the `ModuleDefId` reexport. Also rename `ImportsLocatorIde` into plain `ImportsLocator` Co-authored-by: Kirill Bulatov <[email protected]>
2 parents 46027e1 + f4a4fcf commit 918115c

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

crates/ra_assists/src/assists/auto_import.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use crate::{
88
assist_ctx::{ActionBuilder, Assist, AssistCtx},
99
auto_import_text_edit, AssistId,
1010
};
11-
use ra_ide_db::imports_locator::ImportsLocatorIde;
11+
use ra_ide_db::imports_locator::ImportsLocator;
1212

1313
// Assist: auto_import
1414
//
@@ -52,7 +52,7 @@ pub(crate) fn auto_import(ctx: AssistCtx) -> Option<Assist> {
5252
return None;
5353
}
5454

55-
let mut imports_locator = ImportsLocatorIde::new(ctx.db);
55+
let mut imports_locator = ImportsLocator::new(ctx.db);
5656

5757
let proposed_imports = imports_locator
5858
.find_imports(&name_to_import)

crates/ra_hir/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ pub use hir_def::{
5656
nameres::ModuleSource,
5757
path::{ModPath, Path, PathKind},
5858
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.
6059
};
6160
pub use hir_expand::{
6261
name::{name, Name},

crates/ra_ide_db/src/imports_locator.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ use crate::{
1212
RootDatabase,
1313
};
1414

15-
pub struct ImportsLocatorIde<'a> {
15+
pub struct ImportsLocator<'a> {
1616
source_binder: SourceBinder<'a, RootDatabase>,
1717
}
1818

19-
impl<'a> ImportsLocatorIde<'a> {
19+
impl<'a> ImportsLocator<'a> {
2020
pub fn new(db: &'a RootDatabase) -> Self {
2121
Self { source_binder: SourceBinder::new(db) }
2222
}

0 commit comments

Comments
 (0)