mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Remove the leftovers after ImportLocator removal
This commit is contained in:
parent
46027e10be
commit
f4a4fcf275
3 changed files with 4 additions and 5 deletions
|
@ -8,7 +8,7 @@ use crate::{
|
||||||
assist_ctx::{ActionBuilder, Assist, AssistCtx},
|
assist_ctx::{ActionBuilder, Assist, AssistCtx},
|
||||||
auto_import_text_edit, AssistId,
|
auto_import_text_edit, AssistId,
|
||||||
};
|
};
|
||||||
use ra_ide_db::imports_locator::ImportsLocatorIde;
|
use ra_ide_db::imports_locator::ImportsLocator;
|
||||||
|
|
||||||
// Assist: auto_import
|
// Assist: auto_import
|
||||||
//
|
//
|
||||||
|
@ -52,7 +52,7 @@ pub(crate) fn auto_import(ctx: AssistCtx) -> Option<Assist> {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut imports_locator = ImportsLocatorIde::new(ctx.db);
|
let mut imports_locator = ImportsLocator::new(ctx.db);
|
||||||
|
|
||||||
let proposed_imports = imports_locator
|
let proposed_imports = imports_locator
|
||||||
.find_imports(&name_to_import)
|
.find_imports(&name_to_import)
|
||||||
|
|
|
@ -56,7 +56,6 @@ pub use hir_def::{
|
||||||
nameres::ModuleSource,
|
nameres::ModuleSource,
|
||||||
path::{ModPath, Path, PathKind},
|
path::{ModPath, Path, PathKind},
|
||||||
type_ref::Mutability,
|
type_ref::Mutability,
|
||||||
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.
|
|
||||||
};
|
};
|
||||||
pub use hir_expand::{
|
pub use hir_expand::{
|
||||||
name::{name, Name},
|
name::{name, Name},
|
||||||
|
|
|
@ -12,11 +12,11 @@ use crate::{
|
||||||
RootDatabase,
|
RootDatabase,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub struct ImportsLocatorIde<'a> {
|
pub struct ImportsLocator<'a> {
|
||||||
source_binder: SourceBinder<'a, RootDatabase>,
|
source_binder: SourceBinder<'a, RootDatabase>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> ImportsLocatorIde<'a> {
|
impl<'a> ImportsLocator<'a> {
|
||||||
pub fn new(db: &'a RootDatabase) -> Self {
|
pub fn new(db: &'a RootDatabase) -> Self {
|
||||||
Self { source_binder: SourceBinder::new(db) }
|
Self { source_binder: SourceBinder::new(db) }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue