aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/nameres
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-09-08 07:53:49 +0100
committerAleksey Kladov <[email protected]>2019-09-08 07:55:12 +0100
commit6021a2a83a2e229847905c6d06ba412faddd1acb (patch)
tree7d44c7e64dab1426aacbea26ea447ca0df8347aa /crates/ra_hir/src/nameres
parent787f1206a975ea82d7af878f2acaea15b08b5d36 (diff)
cleanup hir db imports
Diffstat (limited to 'crates/ra_hir/src/nameres')
-rw-r--r--crates/ra_hir/src/nameres/collector.rs7
-rw-r--r--crates/ra_hir/src/nameres/mod_resolution.rs2
-rw-r--r--crates/ra_hir/src/nameres/raw.rs4
3 files changed, 7 insertions, 6 deletions
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;
4use test_utils::tested_by; 4use test_utils::tested_by;
5 5
6use crate::{ 6use crate::{
7 db::DefDatabase,
7 either::Either, 8 either::Either,
8 ids::{AstItemDef, LocationCtx, MacroCallId, MacroCallLoc, MacroDefId, MacroFileKind}, 9 ids::{AstItemDef, LocationCtx, MacroCallId, MacroCallLoc, MacroDefId, MacroFileKind},
9 name::MACRO_RULES, 10 name::MACRO_RULES,
@@ -13,8 +14,8 @@ use crate::{
13 raw, CrateDefMap, CrateModuleId, ItemOrMacro, ModuleData, ModuleDef, PerNs, 14 raw, CrateDefMap, CrateModuleId, ItemOrMacro, ModuleData, ModuleDef, PerNs,
14 ReachedFixedPoint, Resolution, ResolveMode, 15 ReachedFixedPoint, Resolution, ResolveMode,
15 }, 16 },
16 AstId, Const, DefDatabase, Enum, Function, HirFileId, MacroDef, Module, Name, Path, Static, 17 AstId, Const, Enum, Function, HirFileId, MacroDef, Module, Name, Path, Static, Struct, Trait,
17 Struct, Trait, TypeAlias, Union, 18 TypeAlias, Union,
18}; 19};
19 20
20pub(super) fn collect_defs(db: &impl DefDatabase, mut def_map: CrateDefMap) -> CrateDefMap { 21pub(super) fn collect_defs(db: &impl DefDatabase, mut def_map: CrateDefMap) -> CrateDefMap {
@@ -699,7 +700,7 @@ mod tests {
699 use ra_db::SourceDatabase; 700 use ra_db::SourceDatabase;
700 701
701 use super::*; 702 use super::*;
702 use crate::{mock::MockDatabase, Crate, DefDatabase}; 703 use crate::{db::DefDatabase, mock::MockDatabase, Crate};
703 use ra_arena::Arena; 704 use ra_arena::Arena;
704 use rustc_hash::FxHashSet; 705 use rustc_hash::FxHashSet;
705 706
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};
6use ra_syntax::SmolStr; 6use ra_syntax::SmolStr;
7use relative_path::RelativePathBuf; 7use relative_path::RelativePathBuf;
8 8
9use crate::{DefDatabase, HirFileId, Name}; 9use crate::{db::DefDatabase, HirFileId, Name};
10 10
11#[derive(Clone, Copy)] 11#[derive(Clone, Copy)]
12pub(super) struct ParentModule<'a> { 12pub(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::{
8use test_utils::tested_by; 8use test_utils::tested_by;
9 9
10use crate::{ 10use crate::{
11 AsName, AstDatabase, AstIdMap, DefDatabase, Either, FileAstId, HirFileId, ModuleSource, Name, 11 db::{AstDatabase, DefDatabase},
12 Path, 12 AsName, AstIdMap, Either, FileAstId, HirFileId, ModuleSource, Name, Path,
13}; 13};
14 14
15/// `RawItems` is a set of top-level items in a file (except for impls). 15/// `RawItems` is a set of top-level items in a file (except for impls).