diff options
Diffstat (limited to 'crates/ra_hir_def')
-rw-r--r-- | crates/ra_hir_def/Cargo.toml | 2 | ||||
-rw-r--r-- | crates/ra_hir_def/src/body.rs | 4 | ||||
-rw-r--r-- | crates/ra_hir_def/src/body/scope.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_def/src/db.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_def/src/find_path.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_def/src/generics.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_def/src/import_map.rs | 4 | ||||
-rw-r--r-- | crates/ra_hir_def/src/item_scope.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_def/src/item_tree/tests.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_def/src/lib.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_def/src/nameres.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_def/src/nameres/collector.rs | 4 | ||||
-rw-r--r-- | crates/ra_hir_def/src/nameres/mod_resolution.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_def/src/nameres/path_resolution.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_def/src/nameres/tests.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_def/src/nameres/tests/incremental.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_def/src/path.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_def/src/resolver.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_def/src/test_db.rs | 6 |
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" | |||
23 | stdx = { path = "../stdx" } | 23 | stdx = { path = "../stdx" } |
24 | 24 | ||
25 | arena = { path = "../arena" } | 25 | arena = { path = "../arena" } |
26 | ra_db = { path = "../ra_db" } | 26 | base_db = { path = "../base_db" } |
27 | syntax = { path = "../syntax" } | 27 | syntax = { path = "../syntax" } |
28 | profile = { path = "../profile" } | 28 | profile = { path = "../profile" } |
29 | hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" } | 29 | hir_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; | |||
6 | use std::{mem, ops::Index, sync::Arc}; | 6 | use std::{mem, ops::Index, sync::Arc}; |
7 | 7 | ||
8 | use arena::{map::ArenaMap, Arena}; | 8 | use arena::{map::ArenaMap, Arena}; |
9 | use base_db::CrateId; | ||
9 | use cfg::CfgOptions; | 10 | use cfg::CfgOptions; |
10 | use drop_bomb::DropBomb; | 11 | use drop_bomb::DropBomb; |
11 | use either::Either; | 12 | use either::Either; |
12 | use hir_expand::{ast_id_map::AstIdMap, hygiene::Hygiene, AstId, HirFileId, InFile, MacroDefId}; | 13 | use hir_expand::{ast_id_map::AstIdMap, hygiene::Hygiene, AstId, HirFileId, InFile, MacroDefId}; |
13 | use ra_db::CrateId; | ||
14 | use rustc_hash::FxHashMap; | 14 | use rustc_hash::FxHashMap; |
15 | use syntax::{ast, AstNode, AstPtr}; | 15 | use syntax::{ast, AstNode, AstPtr}; |
16 | use test_utils::mark; | 16 | use test_utils::mark; |
@@ -320,7 +320,7 @@ impl BodySourceMap { | |||
320 | 320 | ||
321 | #[cfg(test)] | 321 | #[cfg(test)] |
322 | mod tests { | 322 | mod 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)] |
171 | mod tests { | 171 | mod 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. |
2 | use std::sync::Arc; | 2 | use std::sync::Arc; |
3 | 3 | ||
4 | use base_db::{salsa, CrateId, SourceDatabase, Upcast}; | ||
4 | use hir_expand::{db::AstDatabase, HirFileId}; | 5 | use hir_expand::{db::AstDatabase, HirFileId}; |
5 | use ra_db::{salsa, CrateId, SourceDatabase, Upcast}; | ||
6 | use syntax::SmolStr; | 6 | use syntax::SmolStr; |
7 | 7 | ||
8 | use crate::{ | 8 | use 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)] |
294 | mod tests { | 294 | mod 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 @@ | |||
5 | use std::sync::Arc; | 5 | use std::sync::Arc; |
6 | 6 | ||
7 | use arena::{map::ArenaMap, Arena}; | 7 | use arena::{map::ArenaMap, Arena}; |
8 | use base_db::FileId; | ||
8 | use either::Either; | 9 | use either::Either; |
9 | use hir_expand::{ | 10 | use hir_expand::{ |
10 | name::{name, AsName, Name}, | 11 | name::{name, AsName, Name}, |
11 | InFile, | 12 | InFile, |
12 | }; | 13 | }; |
13 | use ra_db::FileId; | ||
14 | use syntax::ast::{self, GenericParamsOwner, NameOwner, TypeBoundsOwner}; | 14 | use syntax::ast::{self, GenericParamsOwner, NameOwner, TypeBoundsOwner}; |
15 | 15 | ||
16 | use crate::{ | 16 | use 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 | ||
3 | use std::{cmp::Ordering, fmt, hash::BuildHasherDefault, sync::Arc}; | 3 | use std::{cmp::Ordering, fmt, hash::BuildHasherDefault, sync::Arc}; |
4 | 4 | ||
5 | use base_db::CrateId; | ||
5 | use fst::{self, Streamer}; | 6 | use fst::{self, Streamer}; |
6 | use indexmap::{map::Entry, IndexMap}; | 7 | use indexmap::{map::Entry, IndexMap}; |
7 | use ra_db::CrateId; | ||
8 | use rustc_hash::{FxHashMap, FxHasher}; | 8 | use rustc_hash::{FxHashMap, FxHasher}; |
9 | use smallvec::SmallVec; | 9 | use smallvec::SmallVec; |
10 | use syntax::SmolStr; | 10 | use syntax::SmolStr; |
@@ -327,8 +327,8 @@ pub fn search_dependencies<'a>( | |||
327 | 327 | ||
328 | #[cfg(test)] | 328 | #[cfg(test)] |
329 | mod tests { | 329 | mod 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 | ||
4 | use std::collections::hash_map::Entry; | 4 | use std::collections::hash_map::Entry; |
5 | 5 | ||
6 | use base_db::CrateId; | ||
6 | use hir_expand::name::Name; | 7 | use hir_expand::name::Name; |
7 | use once_cell::sync::Lazy; | 8 | use once_cell::sync::Lazy; |
8 | use ra_db::CrateId; | ||
9 | use rustc_hash::{FxHashMap, FxHashSet}; | 9 | use rustc_hash::{FxHashMap, FxHashSet}; |
10 | use test_utils::mark; | 10 | use 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 @@ | |||
1 | use base_db::fixture::WithFixture; | ||
1 | use expect::{expect, Expect}; | 2 | use expect::{expect, Expect}; |
2 | use hir_expand::{db::AstDatabase, HirFileId, InFile}; | 3 | use hir_expand::{db::AstDatabase, HirFileId, InFile}; |
3 | use ra_db::fixture::WithFixture; | ||
4 | use rustc_hash::FxHashSet; | 4 | use rustc_hash::FxHashSet; |
5 | use std::sync::Arc; | 5 | use std::sync::Arc; |
6 | use stdx::format_to; | 6 | use 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; | |||
53 | use std::hash::{Hash, Hasher}; | 53 | use std::hash::{Hash, Hasher}; |
54 | 54 | ||
55 | use arena::Idx; | 55 | use arena::Idx; |
56 | use base_db::{impl_intern_key, salsa, CrateId}; | ||
56 | use hir_expand::{ | 57 | use 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 | }; |
60 | use ra_db::{impl_intern_key, salsa, CrateId}; | ||
61 | use syntax::ast; | 61 | use syntax::ast; |
62 | 62 | ||
63 | use crate::builtin_type::BuiltinType; | 63 | use 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; | |||
57 | use std::sync::Arc; | 57 | use std::sync::Arc; |
58 | 58 | ||
59 | use arena::Arena; | 59 | use arena::Arena; |
60 | use base_db::{CrateId, Edition, FileId}; | ||
60 | use hir_expand::{diagnostics::DiagnosticSink, name::Name, InFile}; | 61 | use hir_expand::{diagnostics::DiagnosticSink, name::Name, InFile}; |
61 | use ra_db::{CrateId, Edition, FileId}; | ||
62 | use rustc_hash::FxHashMap; | 62 | use rustc_hash::FxHashMap; |
63 | use stdx::format_to; | 63 | use stdx::format_to; |
64 | use syntax::ast; | 64 | use 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 | ||
6 | use base_db::{CrateId, FileId, ProcMacroId}; | ||
6 | use cfg::CfgOptions; | 7 | use cfg::CfgOptions; |
7 | use hir_expand::{ | 8 | use 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 | }; |
15 | use ra_db::{CrateId, FileId, ProcMacroId}; | ||
16 | use rustc_hash::FxHashMap; | 16 | use rustc_hash::FxHashMap; |
17 | use syntax::ast; | 17 | use syntax::ast; |
18 | use test_utils::mark; | 18 | use test_utils::mark; |
@@ -1209,7 +1209,7 @@ fn is_macro_rules(path: &ModPath) -> bool { | |||
1209 | mod tests { | 1209 | mod 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. |
2 | use base_db::FileId; | ||
2 | use hir_expand::name::Name; | 3 | use hir_expand::name::Name; |
3 | use ra_db::FileId; | ||
4 | use syntax::SmolStr; | 4 | use syntax::SmolStr; |
5 | 5 | ||
6 | use crate::{db::DefDatabase, HirFileId}; | 6 | use 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 | ||
13 | use std::iter::successors; | 13 | use std::iter::successors; |
14 | 14 | ||
15 | use base_db::Edition; | ||
15 | use hir_expand::name::Name; | 16 | use hir_expand::name::Name; |
16 | use ra_db::Edition; | ||
17 | use test_utils::mark; | 17 | use test_utils::mark; |
18 | 18 | ||
19 | use crate::{ | 19 | use 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 | ||
7 | use std::sync::Arc; | 7 | use std::sync::Arc; |
8 | 8 | ||
9 | use base_db::{fixture::WithFixture, SourceDatabase}; | ||
9 | use expect::{expect, Expect}; | 10 | use expect::{expect, Expect}; |
10 | use ra_db::{fixture::WithFixture, SourceDatabase}; | ||
11 | use test_utils::mark; | 11 | use test_utils::mark; |
12 | 12 | ||
13 | use crate::{db::DefDatabase, nameres::*, test_db::TestDB}; | 13 | use 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 @@ | |||
1 | use std::sync::Arc; | 1 | use std::sync::Arc; |
2 | 2 | ||
3 | use ra_db::SourceDatabaseExt; | 3 | use base_db::SourceDatabaseExt; |
4 | 4 | ||
5 | use super::*; | 5 | use 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 | ||
10 | use crate::body::LowerCtx; | 10 | use crate::body::LowerCtx; |
11 | use base_db::CrateId; | ||
11 | use hir_expand::{ | 12 | use hir_expand::{ |
12 | hygiene::Hygiene, | 13 | hygiene::Hygiene, |
13 | name::{AsName, Name}, | 14 | name::{AsName, Name}, |
14 | }; | 15 | }; |
15 | use ra_db::CrateId; | ||
16 | use syntax::ast; | 16 | use syntax::ast; |
17 | 17 | ||
18 | use crate::{ | 18 | use 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. |
2 | use std::sync::Arc; | 2 | use std::sync::Arc; |
3 | 3 | ||
4 | use base_db::CrateId; | ||
4 | use hir_expand::{ | 5 | use hir_expand::{ |
5 | name::{name, Name}, | 6 | name::{name, Name}, |
6 | MacroDefId, | 7 | MacroDefId, |
7 | }; | 8 | }; |
8 | use ra_db::CrateId; | ||
9 | use rustc_hash::FxHashSet; | 9 | use rustc_hash::FxHashSet; |
10 | 10 | ||
11 | use crate::{ | 11 | use 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 | ||
8 | use base_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate, Upcast}; | ||
8 | use hir_expand::db::AstDatabase; | 9 | use hir_expand::db::AstDatabase; |
9 | use ra_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate, Upcast}; | ||
10 | use rustc_hash::FxHashSet; | 10 | use rustc_hash::FxHashSet; |
11 | 11 | ||
12 | use crate::db::DefDatabase; | 12 | use 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 |