From 6021a2a83a2e229847905c6d06ba412faddd1acb Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 8 Sep 2019 09:53:49 +0300 Subject: cleanup hir db imports --- crates/ra_hir/src/nameres/collector.rs | 7 ++++--- crates/ra_hir/src/nameres/mod_resolution.rs | 2 +- crates/ra_hir/src/nameres/raw.rs | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) (limited to 'crates/ra_hir/src/nameres') diff --git a/crates/ra_hir/src/nameres/collector.rs b/crates/ra_hir/src/nameres/collector.rs index 34b90a666..1c0d4369e 100644 --- a/crates/ra_hir/src/nameres/collector.rs +++ b/crates/ra_hir/src/nameres/collector.rs @@ -4,6 +4,7 @@ use rustc_hash::FxHashMap; use test_utils::tested_by; use crate::{ + db::DefDatabase, either::Either, ids::{AstItemDef, LocationCtx, MacroCallId, MacroCallLoc, MacroDefId, MacroFileKind}, name::MACRO_RULES, @@ -13,8 +14,8 @@ use crate::{ raw, CrateDefMap, CrateModuleId, ItemOrMacro, ModuleData, ModuleDef, PerNs, ReachedFixedPoint, Resolution, ResolveMode, }, - AstId, Const, DefDatabase, Enum, Function, HirFileId, MacroDef, Module, Name, Path, Static, - Struct, Trait, TypeAlias, Union, + AstId, Const, Enum, Function, HirFileId, MacroDef, Module, Name, Path, Static, Struct, Trait, + TypeAlias, Union, }; pub(super) fn collect_defs(db: &impl DefDatabase, mut def_map: CrateDefMap) -> CrateDefMap { @@ -699,7 +700,7 @@ mod tests { use ra_db::SourceDatabase; use super::*; - use crate::{mock::MockDatabase, Crate, DefDatabase}; + use crate::{db::DefDatabase, mock::MockDatabase, Crate}; use ra_arena::Arena; use rustc_hash::FxHashSet; diff --git a/crates/ra_hir/src/nameres/mod_resolution.rs b/crates/ra_hir/src/nameres/mod_resolution.rs index 918c9591f..a9e9eb9e6 100644 --- a/crates/ra_hir/src/nameres/mod_resolution.rs +++ b/crates/ra_hir/src/nameres/mod_resolution.rs @@ -6,7 +6,7 @@ use ra_db::{FileId, SourceRoot}; use ra_syntax::SmolStr; use relative_path::RelativePathBuf; -use crate::{DefDatabase, HirFileId, Name}; +use crate::{db::DefDatabase, HirFileId, Name}; #[derive(Clone, Copy)] pub(super) struct ParentModule<'a> { diff --git a/crates/ra_hir/src/nameres/raw.rs b/crates/ra_hir/src/nameres/raw.rs index 129b047eb..7963736e0 100644 --- a/crates/ra_hir/src/nameres/raw.rs +++ b/crates/ra_hir/src/nameres/raw.rs @@ -8,8 +8,8 @@ use ra_syntax::{ use test_utils::tested_by; use crate::{ - AsName, AstDatabase, AstIdMap, DefDatabase, Either, FileAstId, HirFileId, ModuleSource, Name, - Path, + db::{AstDatabase, DefDatabase}, + AsName, AstIdMap, Either, FileAstId, HirFileId, ModuleSource, Name, Path, }; /// `RawItems` is a set of top-level items in a file (except for impls). -- cgit v1.2.3