aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_def')
-rw-r--r--crates/ra_hir_def/Cargo.toml2
-rw-r--r--crates/ra_hir_def/src/body.rs4
-rw-r--r--crates/ra_hir_def/src/body/scope.rs2
-rw-r--r--crates/ra_hir_def/src/db.rs2
-rw-r--r--crates/ra_hir_def/src/find_path.rs2
-rw-r--r--crates/ra_hir_def/src/generics.rs2
-rw-r--r--crates/ra_hir_def/src/import_map.rs4
-rw-r--r--crates/ra_hir_def/src/item_scope.rs2
-rw-r--r--crates/ra_hir_def/src/item_tree/tests.rs2
-rw-r--r--crates/ra_hir_def/src/lib.rs2
-rw-r--r--crates/ra_hir_def/src/nameres.rs2
-rw-r--r--crates/ra_hir_def/src/nameres/collector.rs4
-rw-r--r--crates/ra_hir_def/src/nameres/mod_resolution.rs2
-rw-r--r--crates/ra_hir_def/src/nameres/path_resolution.rs2
-rw-r--r--crates/ra_hir_def/src/nameres/tests.rs2
-rw-r--r--crates/ra_hir_def/src/nameres/tests/incremental.rs2
-rw-r--r--crates/ra_hir_def/src/path.rs2
-rw-r--r--crates/ra_hir_def/src/resolver.rs2
-rw-r--r--crates/ra_hir_def/src/test_db.rs6
19 files changed, 24 insertions, 24 deletions
diff --git a/crates/ra_hir_def/Cargo.toml b/crates/ra_hir_def/Cargo.toml
index e7d3c4d5b..2b187bc4a 100644
--- a/crates/ra_hir_def/Cargo.toml
+++ b/crates/ra_hir_def/Cargo.toml
@@ -23,7 +23,7 @@ smallvec = "1.4.0"
23stdx = { path = "../stdx" } 23stdx = { path = "../stdx" }
24 24
25arena = { path = "../arena" } 25arena = { path = "../arena" }
26ra_db = { path = "../ra_db" } 26base_db = { path = "../base_db" }
27syntax = { path = "../syntax" } 27syntax = { path = "../syntax" }
28profile = { path = "../profile" } 28profile = { path = "../profile" }
29hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" } 29hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" }
diff --git a/crates/ra_hir_def/src/body.rs b/crates/ra_hir_def/src/body.rs
index fe659386a..9a9a605dd 100644
--- a/crates/ra_hir_def/src/body.rs
+++ b/crates/ra_hir_def/src/body.rs
@@ -6,11 +6,11 @@ pub mod scope;
6use std::{mem, ops::Index, sync::Arc}; 6use std::{mem, ops::Index, sync::Arc};
7 7
8use arena::{map::ArenaMap, Arena}; 8use arena::{map::ArenaMap, Arena};
9use base_db::CrateId;
9use cfg::CfgOptions; 10use cfg::CfgOptions;
10use drop_bomb::DropBomb; 11use drop_bomb::DropBomb;
11use either::Either; 12use either::Either;
12use hir_expand::{ast_id_map::AstIdMap, hygiene::Hygiene, AstId, HirFileId, InFile, MacroDefId}; 13use hir_expand::{ast_id_map::AstIdMap, hygiene::Hygiene, AstId, HirFileId, InFile, MacroDefId};
13use ra_db::CrateId;
14use rustc_hash::FxHashMap; 14use rustc_hash::FxHashMap;
15use syntax::{ast, AstNode, AstPtr}; 15use syntax::{ast, AstNode, AstPtr};
16use test_utils::mark; 16use test_utils::mark;
@@ -320,7 +320,7 @@ impl BodySourceMap {
320 320
321#[cfg(test)] 321#[cfg(test)]
322mod tests { 322mod tests {
323 use ra_db::{fixture::WithFixture, SourceDatabase}; 323 use base_db::{fixture::WithFixture, SourceDatabase};
324 use test_utils::mark; 324 use test_utils::mark;
325 325
326 use crate::ModuleDefId; 326 use crate::ModuleDefId;
diff --git a/crates/ra_hir_def/src/body/scope.rs b/crates/ra_hir_def/src/body/scope.rs
index 079f14c29..9142bc05b 100644
--- a/crates/ra_hir_def/src/body/scope.rs
+++ b/crates/ra_hir_def/src/body/scope.rs
@@ -169,8 +169,8 @@ fn compute_expr_scopes(expr: ExprId, body: &Body, scopes: &mut ExprScopes, scope
169 169
170#[cfg(test)] 170#[cfg(test)]
171mod tests { 171mod tests {
172 use base_db::{fixture::WithFixture, FileId, SourceDatabase};
172 use hir_expand::{name::AsName, InFile}; 173 use hir_expand::{name::AsName, InFile};
173 use ra_db::{fixture::WithFixture, FileId, SourceDatabase};
174 use syntax::{algo::find_node_at_offset, ast, AstNode}; 174 use syntax::{algo::find_node_at_offset, ast, AstNode};
175 use test_utils::{assert_eq_text, extract_offset, mark}; 175 use test_utils::{assert_eq_text, extract_offset, mark};
176 176
diff --git a/crates/ra_hir_def/src/db.rs b/crates/ra_hir_def/src/db.rs
index a925548b5..6d694de11 100644
--- a/crates/ra_hir_def/src/db.rs
+++ b/crates/ra_hir_def/src/db.rs
@@ -1,8 +1,8 @@
1//! Defines database & queries for name resolution. 1//! Defines database & queries for name resolution.
2use std::sync::Arc; 2use std::sync::Arc;
3 3
4use base_db::{salsa, CrateId, SourceDatabase, Upcast};
4use hir_expand::{db::AstDatabase, HirFileId}; 5use hir_expand::{db::AstDatabase, HirFileId};
5use ra_db::{salsa, CrateId, SourceDatabase, Upcast};
6use syntax::SmolStr; 6use syntax::SmolStr;
7 7
8use crate::{ 8use crate::{
diff --git a/crates/ra_hir_def/src/find_path.rs b/crates/ra_hir_def/src/find_path.rs
index 5099f417d..ac2c54ac5 100644
--- a/crates/ra_hir_def/src/find_path.rs
+++ b/crates/ra_hir_def/src/find_path.rs
@@ -292,8 +292,8 @@ fn find_local_import_locations(
292 292
293#[cfg(test)] 293#[cfg(test)]
294mod tests { 294mod tests {
295 use base_db::fixture::WithFixture;
295 use hir_expand::hygiene::Hygiene; 296 use hir_expand::hygiene::Hygiene;
296 use ra_db::fixture::WithFixture;
297 use syntax::ast::AstNode; 297 use syntax::ast::AstNode;
298 use test_utils::mark; 298 use test_utils::mark;
299 299
diff --git a/crates/ra_hir_def/src/generics.rs b/crates/ra_hir_def/src/generics.rs
index 4476f0316..835fe3fbd 100644
--- a/crates/ra_hir_def/src/generics.rs
+++ b/crates/ra_hir_def/src/generics.rs
@@ -5,12 +5,12 @@
5use std::sync::Arc; 5use std::sync::Arc;
6 6
7use arena::{map::ArenaMap, Arena}; 7use arena::{map::ArenaMap, Arena};
8use base_db::FileId;
8use either::Either; 9use either::Either;
9use hir_expand::{ 10use hir_expand::{
10 name::{name, AsName, Name}, 11 name::{name, AsName, Name},
11 InFile, 12 InFile,
12}; 13};
13use ra_db::FileId;
14use syntax::ast::{self, GenericParamsOwner, NameOwner, TypeBoundsOwner}; 14use syntax::ast::{self, GenericParamsOwner, NameOwner, TypeBoundsOwner};
15 15
16use crate::{ 16use crate::{
diff --git a/crates/ra_hir_def/src/import_map.rs b/crates/ra_hir_def/src/import_map.rs
index 431ff30ab..d32a0bdaf 100644
--- a/crates/ra_hir_def/src/import_map.rs
+++ b/crates/ra_hir_def/src/import_map.rs
@@ -2,9 +2,9 @@
2 2
3use std::{cmp::Ordering, fmt, hash::BuildHasherDefault, sync::Arc}; 3use std::{cmp::Ordering, fmt, hash::BuildHasherDefault, sync::Arc};
4 4
5use base_db::CrateId;
5use fst::{self, Streamer}; 6use fst::{self, Streamer};
6use indexmap::{map::Entry, IndexMap}; 7use indexmap::{map::Entry, IndexMap};
7use ra_db::CrateId;
8use rustc_hash::{FxHashMap, FxHasher}; 8use rustc_hash::{FxHashMap, FxHasher};
9use smallvec::SmallVec; 9use smallvec::SmallVec;
10use syntax::SmolStr; 10use syntax::SmolStr;
@@ -327,8 +327,8 @@ pub fn search_dependencies<'a>(
327 327
328#[cfg(test)] 328#[cfg(test)]
329mod tests { 329mod tests {
330 use base_db::{fixture::WithFixture, SourceDatabase, Upcast};
330 use expect::{expect, Expect}; 331 use expect::{expect, Expect};
331 use ra_db::{fixture::WithFixture, SourceDatabase, Upcast};
332 332
333 use crate::{test_db::TestDB, AssocContainerId, Lookup}; 333 use crate::{test_db::TestDB, AssocContainerId, Lookup};
334 334
diff --git a/crates/ra_hir_def/src/item_scope.rs b/crates/ra_hir_def/src/item_scope.rs
index 8fee4b15e..f1e9dfd5b 100644
--- a/crates/ra_hir_def/src/item_scope.rs
+++ b/crates/ra_hir_def/src/item_scope.rs
@@ -3,9 +3,9 @@
3 3
4use std::collections::hash_map::Entry; 4use std::collections::hash_map::Entry;
5 5
6use base_db::CrateId;
6use hir_expand::name::Name; 7use hir_expand::name::Name;
7use once_cell::sync::Lazy; 8use once_cell::sync::Lazy;
8use ra_db::CrateId;
9use rustc_hash::{FxHashMap, FxHashSet}; 9use rustc_hash::{FxHashMap, FxHashSet};
10use test_utils::mark; 10use test_utils::mark;
11 11
diff --git a/crates/ra_hir_def/src/item_tree/tests.rs b/crates/ra_hir_def/src/item_tree/tests.rs
index 6c843e339..2f62eddcb 100644
--- a/crates/ra_hir_def/src/item_tree/tests.rs
+++ b/crates/ra_hir_def/src/item_tree/tests.rs
@@ -1,6 +1,6 @@
1use base_db::fixture::WithFixture;
1use expect::{expect, Expect}; 2use expect::{expect, Expect};
2use hir_expand::{db::AstDatabase, HirFileId, InFile}; 3use hir_expand::{db::AstDatabase, HirFileId, InFile};
3use ra_db::fixture::WithFixture;
4use rustc_hash::FxHashSet; 4use rustc_hash::FxHashSet;
5use std::sync::Arc; 5use std::sync::Arc;
6use stdx::format_to; 6use stdx::format_to;
diff --git a/crates/ra_hir_def/src/lib.rs b/crates/ra_hir_def/src/lib.rs
index 806ac731f..f24a1dd77 100644
--- a/crates/ra_hir_def/src/lib.rs
+++ b/crates/ra_hir_def/src/lib.rs
@@ -53,11 +53,11 @@ mod test_db;
53use std::hash::{Hash, Hasher}; 53use std::hash::{Hash, Hasher};
54 54
55use arena::Idx; 55use arena::Idx;
56use base_db::{impl_intern_key, salsa, CrateId};
56use hir_expand::{ 57use hir_expand::{
57 ast_id_map::FileAstId, eager::expand_eager_macro, hygiene::Hygiene, AstId, HirFileId, InFile, 58 ast_id_map::FileAstId, eager::expand_eager_macro, hygiene::Hygiene, AstId, HirFileId, InFile,
58 MacroCallId, MacroCallKind, MacroDefId, MacroDefKind, 59 MacroCallId, MacroCallKind, MacroDefId, MacroDefKind,
59}; 60};
60use ra_db::{impl_intern_key, salsa, CrateId};
61use syntax::ast; 61use syntax::ast;
62 62
63use crate::builtin_type::BuiltinType; 63use crate::builtin_type::BuiltinType;
diff --git a/crates/ra_hir_def/src/nameres.rs b/crates/ra_hir_def/src/nameres.rs
index d26c837cc..bf302172d 100644
--- a/crates/ra_hir_def/src/nameres.rs
+++ b/crates/ra_hir_def/src/nameres.rs
@@ -57,8 +57,8 @@ mod tests;
57use std::sync::Arc; 57use std::sync::Arc;
58 58
59use arena::Arena; 59use arena::Arena;
60use base_db::{CrateId, Edition, FileId};
60use hir_expand::{diagnostics::DiagnosticSink, name::Name, InFile}; 61use hir_expand::{diagnostics::DiagnosticSink, name::Name, InFile};
61use ra_db::{CrateId, Edition, FileId};
62use rustc_hash::FxHashMap; 62use rustc_hash::FxHashMap;
63use stdx::format_to; 63use stdx::format_to;
64use syntax::ast; 64use syntax::ast;
diff --git a/crates/ra_hir_def/src/nameres/collector.rs b/crates/ra_hir_def/src/nameres/collector.rs
index 6a5891936..3e99c8773 100644
--- a/crates/ra_hir_def/src/nameres/collector.rs
+++ b/crates/ra_hir_def/src/nameres/collector.rs
@@ -3,6 +3,7 @@
3//! `DefCollector::collect` contains the fixed-point iteration loop which 3//! `DefCollector::collect` contains the fixed-point iteration loop which
4//! resolves imports and expands macros. 4//! resolves imports and expands macros.
5 5
6use base_db::{CrateId, FileId, ProcMacroId};
6use cfg::CfgOptions; 7use cfg::CfgOptions;
7use hir_expand::{ 8use hir_expand::{
8 ast_id_map::FileAstId, 9 ast_id_map::FileAstId,
@@ -12,7 +13,6 @@ use hir_expand::{
12 proc_macro::ProcMacroExpander, 13 proc_macro::ProcMacroExpander,
13 HirFileId, MacroCallId, MacroDefId, MacroDefKind, 14 HirFileId, MacroCallId, MacroDefId, MacroDefKind,
14}; 15};
15use ra_db::{CrateId, FileId, ProcMacroId};
16use rustc_hash::FxHashMap; 16use rustc_hash::FxHashMap;
17use syntax::ast; 17use syntax::ast;
18use test_utils::mark; 18use test_utils::mark;
@@ -1209,7 +1209,7 @@ fn is_macro_rules(path: &ModPath) -> bool {
1209mod tests { 1209mod tests {
1210 use crate::{db::DefDatabase, test_db::TestDB}; 1210 use crate::{db::DefDatabase, test_db::TestDB};
1211 use arena::Arena; 1211 use arena::Arena;
1212 use ra_db::{fixture::WithFixture, SourceDatabase}; 1212 use base_db::{fixture::WithFixture, SourceDatabase};
1213 1213
1214 use super::*; 1214 use super::*;
1215 1215
diff --git a/crates/ra_hir_def/src/nameres/mod_resolution.rs b/crates/ra_hir_def/src/nameres/mod_resolution.rs
index 316245d6b..e8389b484 100644
--- a/crates/ra_hir_def/src/nameres/mod_resolution.rs
+++ b/crates/ra_hir_def/src/nameres/mod_resolution.rs
@@ -1,6 +1,6 @@
1//! This module resolves `mod foo;` declaration to file. 1//! This module resolves `mod foo;` declaration to file.
2use base_db::FileId;
2use hir_expand::name::Name; 3use hir_expand::name::Name;
3use ra_db::FileId;
4use syntax::SmolStr; 4use syntax::SmolStr;
5 5
6use crate::{db::DefDatabase, HirFileId}; 6use crate::{db::DefDatabase, HirFileId};
diff --git a/crates/ra_hir_def/src/nameres/path_resolution.rs b/crates/ra_hir_def/src/nameres/path_resolution.rs
index dbfa7fccb..88e10574e 100644
--- a/crates/ra_hir_def/src/nameres/path_resolution.rs
+++ b/crates/ra_hir_def/src/nameres/path_resolution.rs
@@ -12,8 +12,8 @@
12 12
13use std::iter::successors; 13use std::iter::successors;
14 14
15use base_db::Edition;
15use hir_expand::name::Name; 16use hir_expand::name::Name;
16use ra_db::Edition;
17use test_utils::mark; 17use test_utils::mark;
18 18
19use crate::{ 19use crate::{
diff --git a/crates/ra_hir_def/src/nameres/tests.rs b/crates/ra_hir_def/src/nameres/tests.rs
index 839b1de57..b105d56b2 100644
--- a/crates/ra_hir_def/src/nameres/tests.rs
+++ b/crates/ra_hir_def/src/nameres/tests.rs
@@ -6,8 +6,8 @@ mod primitives;
6 6
7use std::sync::Arc; 7use std::sync::Arc;
8 8
9use base_db::{fixture::WithFixture, SourceDatabase};
9use expect::{expect, Expect}; 10use expect::{expect, Expect};
10use ra_db::{fixture::WithFixture, SourceDatabase};
11use test_utils::mark; 11use test_utils::mark;
12 12
13use crate::{db::DefDatabase, nameres::*, test_db::TestDB}; 13use crate::{db::DefDatabase, nameres::*, test_db::TestDB};
diff --git a/crates/ra_hir_def/src/nameres/tests/incremental.rs b/crates/ra_hir_def/src/nameres/tests/incremental.rs
index 0c288a108..cfbc62cc4 100644
--- a/crates/ra_hir_def/src/nameres/tests/incremental.rs
+++ b/crates/ra_hir_def/src/nameres/tests/incremental.rs
@@ -1,6 +1,6 @@
1use std::sync::Arc; 1use std::sync::Arc;
2 2
3use ra_db::SourceDatabaseExt; 3use base_db::SourceDatabaseExt;
4 4
5use super::*; 5use super::*;
6 6
diff --git a/crates/ra_hir_def/src/path.rs b/crates/ra_hir_def/src/path.rs
index 88be07c8a..74d26f08b 100644
--- a/crates/ra_hir_def/src/path.rs
+++ b/crates/ra_hir_def/src/path.rs
@@ -8,11 +8,11 @@ use std::{
8}; 8};
9 9
10use crate::body::LowerCtx; 10use crate::body::LowerCtx;
11use base_db::CrateId;
11use hir_expand::{ 12use hir_expand::{
12 hygiene::Hygiene, 13 hygiene::Hygiene,
13 name::{AsName, Name}, 14 name::{AsName, Name},
14}; 15};
15use ra_db::CrateId;
16use syntax::ast; 16use syntax::ast;
17 17
18use crate::{ 18use crate::{
diff --git a/crates/ra_hir_def/src/resolver.rs b/crates/ra_hir_def/src/resolver.rs
index 0bf51eb7b..f8cc5e075 100644
--- a/crates/ra_hir_def/src/resolver.rs
+++ b/crates/ra_hir_def/src/resolver.rs
@@ -1,11 +1,11 @@
1//! Name resolution façade. 1//! Name resolution façade.
2use std::sync::Arc; 2use std::sync::Arc;
3 3
4use base_db::CrateId;
4use hir_expand::{ 5use hir_expand::{
5 name::{name, Name}, 6 name::{name, Name},
6 MacroDefId, 7 MacroDefId,
7}; 8};
8use ra_db::CrateId;
9use rustc_hash::FxHashSet; 9use rustc_hash::FxHashSet;
10 10
11use crate::{ 11use crate::{
diff --git a/crates/ra_hir_def/src/test_db.rs b/crates/ra_hir_def/src/test_db.rs
index 339f819b8..42a762936 100644
--- a/crates/ra_hir_def/src/test_db.rs
+++ b/crates/ra_hir_def/src/test_db.rs
@@ -5,15 +5,15 @@ use std::{
5 sync::{Arc, Mutex}, 5 sync::{Arc, Mutex},
6}; 6};
7 7
8use base_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate, Upcast};
8use hir_expand::db::AstDatabase; 9use hir_expand::db::AstDatabase;
9use ra_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate, Upcast};
10use rustc_hash::FxHashSet; 10use rustc_hash::FxHashSet;
11 11
12use crate::db::DefDatabase; 12use crate::db::DefDatabase;
13 13
14#[salsa::database( 14#[salsa::database(
15 ra_db::SourceDatabaseExtStorage, 15 base_db::SourceDatabaseExtStorage,
16 ra_db::SourceDatabaseStorage, 16 base_db::SourceDatabaseStorage,
17 hir_expand::db::AstDatabaseStorage, 17 hir_expand::db::AstDatabaseStorage,
18 crate::db::InternDatabaseStorage, 18 crate::db::InternDatabaseStorage,
19 crate::db::DefDatabaseStorage 19 crate::db::DefDatabaseStorage