mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-02 21:17:39 +00:00
Move imports locator to ide_db
This commit is contained in:
parent
ec23030e16
commit
dfbe96750b
@ -3,9 +3,9 @@
|
|||||||
use either::Either;
|
use either::Either;
|
||||||
use ra_assists::{AssistAction, AssistLabel};
|
use ra_assists::{AssistAction, AssistLabel};
|
||||||
use ra_db::{FilePosition, FileRange};
|
use ra_db::{FilePosition, FileRange};
|
||||||
use ra_ide_db::RootDatabase;
|
use ra_ide_db::{imports_locator::ImportsLocatorIde, RootDatabase};
|
||||||
|
|
||||||
use crate::{imports_locator::ImportsLocatorIde, FileId, SourceChange, SourceFileEdit};
|
use crate::{FileId, SourceChange, SourceFileEdit};
|
||||||
|
|
||||||
pub use ra_assists::AssistId;
|
pub use ra_assists::AssistId;
|
||||||
|
|
||||||
|
@ -26,7 +26,6 @@ mod syntax_highlighting;
|
|||||||
mod parent_module;
|
mod parent_module;
|
||||||
mod references;
|
mod references;
|
||||||
mod impls;
|
mod impls;
|
||||||
mod imports_locator;
|
|
||||||
mod assists;
|
mod assists;
|
||||||
mod diagnostics;
|
mod diagnostics;
|
||||||
mod syntax_tree;
|
mod syntax_tree;
|
||||||
|
@ -3,22 +3,22 @@
|
|||||||
|
|
||||||
use hir::{db::HirDatabase, ModuleDef, SourceBinder};
|
use hir::{db::HirDatabase, ModuleDef, SourceBinder};
|
||||||
use ra_assists::ImportsLocator;
|
use ra_assists::ImportsLocator;
|
||||||
use ra_ide_db::{
|
|
||||||
defs::NameKind,
|
|
||||||
symbol_index::{self, FileSymbol},
|
|
||||||
RootDatabase,
|
|
||||||
};
|
|
||||||
use ra_prof::profile;
|
use ra_prof::profile;
|
||||||
use ra_syntax::{ast, AstNode, SyntaxKind::NAME};
|
use ra_syntax::{ast, AstNode, SyntaxKind::NAME};
|
||||||
|
|
||||||
use crate::{references::classify_name, Query};
|
use crate::{
|
||||||
|
defs::classify_name,
|
||||||
|
defs::NameKind,
|
||||||
|
symbol_index::{self, FileSymbol, Query},
|
||||||
|
RootDatabase,
|
||||||
|
};
|
||||||
|
|
||||||
pub(crate) struct ImportsLocatorIde<'a> {
|
pub struct ImportsLocatorIde<'a> {
|
||||||
source_binder: SourceBinder<'a, RootDatabase>,
|
source_binder: SourceBinder<'a, RootDatabase>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> ImportsLocatorIde<'a> {
|
impl<'a> ImportsLocatorIde<'a> {
|
||||||
pub(crate) 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) }
|
||||||
}
|
}
|
||||||
|
|
@ -8,6 +8,7 @@ pub mod feature_flags;
|
|||||||
pub mod symbol_index;
|
pub mod symbol_index;
|
||||||
pub mod change;
|
pub mod change;
|
||||||
pub mod defs;
|
pub mod defs;
|
||||||
|
pub mod imports_locator;
|
||||||
mod wasm_shims;
|
mod wasm_shims;
|
||||||
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
Loading…
Reference in New Issue
Block a user