diff options
Diffstat (limited to 'crates/ra_hir_def/src')
-rw-r--r-- | crates/ra_hir_def/src/adt.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_def/src/body.rs | 5 | ||||
-rw-r--r-- | crates/ra_hir_def/src/body/lower.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_def/src/body/scope.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_def/src/data.rs | 3 | ||||
-rw-r--r-- | crates/ra_hir_def/src/db.rs | 3 | ||||
-rw-r--r-- | crates/ra_hir_def/src/expr.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_def/src/find_path.rs | 5 | ||||
-rw-r--r-- | crates/ra_hir_def/src/generics.rs | 5 | ||||
-rw-r--r-- | crates/ra_hir_def/src/import_map.rs | 4 | ||||
-rw-r--r-- | crates/ra_hir_def/src/item_tree.rs | 4 | ||||
-rw-r--r-- | crates/ra_hir_def/src/item_tree/lower.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_def/src/lang_item.rs | 7 | ||||
-rw-r--r-- | crates/ra_hir_def/src/lib.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_def/src/nameres.rs | 5 | ||||
-rw-r--r-- | crates/ra_hir_def/src/nameres/collector.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_def/src/src.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir_def/src/trace.rs | 2 |
18 files changed, 26 insertions, 33 deletions
diff --git a/crates/ra_hir_def/src/adt.rs b/crates/ra_hir_def/src/adt.rs index 35c3a9140..896a69ca8 100644 --- a/crates/ra_hir_def/src/adt.rs +++ b/crates/ra_hir_def/src/adt.rs | |||
@@ -2,12 +2,12 @@ | |||
2 | 2 | ||
3 | use std::sync::Arc; | 3 | use std::sync::Arc; |
4 | 4 | ||
5 | use arena::{map::ArenaMap, Arena}; | ||
5 | use either::Either; | 6 | use either::Either; |
6 | use hir_expand::{ | 7 | use hir_expand::{ |
7 | name::{AsName, Name}, | 8 | name::{AsName, Name}, |
8 | InFile, | 9 | InFile, |
9 | }; | 10 | }; |
10 | use ra_arena::{map::ArenaMap, Arena}; | ||
11 | use ra_syntax::ast::{self, NameOwner, VisibilityOwner}; | 11 | use ra_syntax::ast::{self, NameOwner, VisibilityOwner}; |
12 | use tt::{Delimiter, DelimiterKind, Leaf, Subtree, TokenTree}; | 12 | use tt::{Delimiter, DelimiterKind, Leaf, Subtree, TokenTree}; |
13 | 13 | ||
diff --git a/crates/ra_hir_def/src/body.rs b/crates/ra_hir_def/src/body.rs index d5f18b920..1deb1a837 100644 --- a/crates/ra_hir_def/src/body.rs +++ b/crates/ra_hir_def/src/body.rs | |||
@@ -5,13 +5,12 @@ pub mod scope; | |||
5 | 5 | ||
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 drop_bomb::DropBomb; | 9 | use drop_bomb::DropBomb; |
9 | use either::Either; | 10 | use either::Either; |
10 | use hir_expand::{ast_id_map::AstIdMap, hygiene::Hygiene, AstId, HirFileId, InFile, MacroDefId}; | 11 | use hir_expand::{ast_id_map::AstIdMap, hygiene::Hygiene, AstId, HirFileId, InFile, MacroDefId}; |
11 | use ra_arena::{map::ArenaMap, Arena}; | ||
12 | use ra_cfg::CfgOptions; | 12 | use ra_cfg::CfgOptions; |
13 | use ra_db::CrateId; | 13 | use ra_db::CrateId; |
14 | use ra_prof::profile; | ||
15 | use ra_syntax::{ast, AstNode, AstPtr}; | 14 | use ra_syntax::{ast, AstNode, AstPtr}; |
16 | use rustc_hash::FxHashMap; | 15 | use rustc_hash::FxHashMap; |
17 | use test_utils::mark; | 16 | use test_utils::mark; |
@@ -228,7 +227,7 @@ impl Body { | |||
228 | db: &dyn DefDatabase, | 227 | db: &dyn DefDatabase, |
229 | def: DefWithBodyId, | 228 | def: DefWithBodyId, |
230 | ) -> (Arc<Body>, Arc<BodySourceMap>) { | 229 | ) -> (Arc<Body>, Arc<BodySourceMap>) { |
231 | let _p = profile("body_with_source_map_query"); | 230 | let _p = profile::span("body_with_source_map_query"); |
232 | let mut params = None; | 231 | let mut params = None; |
233 | 232 | ||
234 | let (file_id, module, body) = match def { | 233 | let (file_id, module, body) = match def { |
diff --git a/crates/ra_hir_def/src/body/lower.rs b/crates/ra_hir_def/src/body/lower.rs index f5c37edb3..482393006 100644 --- a/crates/ra_hir_def/src/body/lower.rs +++ b/crates/ra_hir_def/src/body/lower.rs | |||
@@ -3,13 +3,13 @@ | |||
3 | 3 | ||
4 | use std::{any::type_name, sync::Arc}; | 4 | use std::{any::type_name, sync::Arc}; |
5 | 5 | ||
6 | use arena::Arena; | ||
6 | use either::Either; | 7 | use either::Either; |
7 | use hir_expand::{ | 8 | use hir_expand::{ |
8 | hygiene::Hygiene, | 9 | hygiene::Hygiene, |
9 | name::{name, AsName, Name}, | 10 | name::{name, AsName, Name}, |
10 | HirFileId, MacroDefId, MacroDefKind, | 11 | HirFileId, MacroDefId, MacroDefKind, |
11 | }; | 12 | }; |
12 | use ra_arena::Arena; | ||
13 | use ra_syntax::{ | 13 | use ra_syntax::{ |
14 | ast::{ | 14 | ast::{ |
15 | self, ArgListOwner, ArrayExprKind, AstChildren, LiteralKind, LoopBodyOwner, NameOwner, | 15 | self, ArgListOwner, ArrayExprKind, AstChildren, LiteralKind, LoopBodyOwner, NameOwner, |
diff --git a/crates/ra_hir_def/src/body/scope.rs b/crates/ra_hir_def/src/body/scope.rs index 99e876683..f783e18b5 100644 --- a/crates/ra_hir_def/src/body/scope.rs +++ b/crates/ra_hir_def/src/body/scope.rs | |||
@@ -1,8 +1,8 @@ | |||
1 | //! Name resolution for expressions. | 1 | //! Name resolution for expressions. |
2 | use std::sync::Arc; | 2 | use std::sync::Arc; |
3 | 3 | ||
4 | use arena::{Arena, Idx}; | ||
4 | use hir_expand::name::Name; | 5 | use hir_expand::name::Name; |
5 | use ra_arena::{Arena, Idx}; | ||
6 | use rustc_hash::FxHashMap; | 6 | use rustc_hash::FxHashMap; |
7 | 7 | ||
8 | use crate::{ | 8 | use crate::{ |
diff --git a/crates/ra_hir_def/src/data.rs b/crates/ra_hir_def/src/data.rs index 88a8ef9bf..758c12f33 100644 --- a/crates/ra_hir_def/src/data.rs +++ b/crates/ra_hir_def/src/data.rs | |||
@@ -3,7 +3,6 @@ | |||
3 | use std::sync::Arc; | 3 | use std::sync::Arc; |
4 | 4 | ||
5 | use hir_expand::{name::Name, InFile}; | 5 | use hir_expand::{name::Name, InFile}; |
6 | use ra_prof::profile; | ||
7 | use ra_syntax::ast; | 6 | use ra_syntax::ast; |
8 | 7 | ||
9 | use crate::{ | 8 | use crate::{ |
@@ -133,7 +132,7 @@ pub struct ImplData { | |||
133 | 132 | ||
134 | impl ImplData { | 133 | impl ImplData { |
135 | pub(crate) fn impl_data_query(db: &dyn DefDatabase, id: ImplId) -> Arc<ImplData> { | 134 | pub(crate) fn impl_data_query(db: &dyn DefDatabase, id: ImplId) -> Arc<ImplData> { |
136 | let _p = profile("impl_data_query"); | 135 | let _p = profile::span("impl_data_query"); |
137 | let impl_loc = id.lookup(db); | 136 | let impl_loc = id.lookup(db); |
138 | 137 | ||
139 | let item_tree = db.item_tree(impl_loc.id.file_id); | 138 | let item_tree = db.item_tree(impl_loc.id.file_id); |
diff --git a/crates/ra_hir_def/src/db.rs b/crates/ra_hir_def/src/db.rs index 9c3ede2d7..1dd4197f8 100644 --- a/crates/ra_hir_def/src/db.rs +++ b/crates/ra_hir_def/src/db.rs | |||
@@ -3,7 +3,6 @@ use std::sync::Arc; | |||
3 | 3 | ||
4 | use hir_expand::{db::AstDatabase, HirFileId}; | 4 | use hir_expand::{db::AstDatabase, HirFileId}; |
5 | use ra_db::{salsa, CrateId, SourceDatabase, Upcast}; | 5 | use ra_db::{salsa, CrateId, SourceDatabase, Upcast}; |
6 | use ra_prof::profile; | ||
7 | use ra_syntax::SmolStr; | 6 | use ra_syntax::SmolStr; |
8 | 7 | ||
9 | use crate::{ | 8 | use crate::{ |
@@ -116,6 +115,6 @@ pub trait DefDatabase: InternDatabase + AstDatabase + Upcast<dyn AstDatabase> { | |||
116 | } | 115 | } |
117 | 116 | ||
118 | fn crate_def_map_wait(db: &impl DefDatabase, krate: CrateId) -> Arc<CrateDefMap> { | 117 | fn crate_def_map_wait(db: &impl DefDatabase, krate: CrateId) -> Arc<CrateDefMap> { |
119 | let _p = profile("crate_def_map:wait"); | 118 | let _p = profile::span("crate_def_map:wait"); |
120 | db.crate_def_map_query(krate) | 119 | db.crate_def_map_query(krate) |
121 | } | 120 | } |
diff --git a/crates/ra_hir_def/src/expr.rs b/crates/ra_hir_def/src/expr.rs index e41cfc16b..befe41c2a 100644 --- a/crates/ra_hir_def/src/expr.rs +++ b/crates/ra_hir_def/src/expr.rs | |||
@@ -12,8 +12,8 @@ | |||
12 | //! | 12 | //! |
13 | //! See also a neighboring `body` module. | 13 | //! See also a neighboring `body` module. |
14 | 14 | ||
15 | use arena::{Idx, RawId}; | ||
15 | use hir_expand::name::Name; | 16 | use hir_expand::name::Name; |
16 | use ra_arena::{Idx, RawId}; | ||
17 | use ra_syntax::ast::RangeOp; | 17 | use ra_syntax::ast::RangeOp; |
18 | 18 | ||
19 | use crate::{ | 19 | use crate::{ |
diff --git a/crates/ra_hir_def/src/find_path.rs b/crates/ra_hir_def/src/find_path.rs index 06701a830..46e70eb48 100644 --- a/crates/ra_hir_def/src/find_path.rs +++ b/crates/ra_hir_def/src/find_path.rs | |||
@@ -1,7 +1,6 @@ | |||
1 | //! An algorithm to find a path to refer to a certain item. | 1 | //! An algorithm to find a path to refer to a certain item. |
2 | 2 | ||
3 | use hir_expand::name::{known, AsName, Name}; | 3 | use hir_expand::name::{known, AsName, Name}; |
4 | use ra_prof::profile; | ||
5 | use rustc_hash::FxHashSet; | 4 | use rustc_hash::FxHashSet; |
6 | use test_utils::mark; | 5 | use test_utils::mark; |
7 | 6 | ||
@@ -18,7 +17,7 @@ use crate::{ | |||
18 | /// Find a path that can be used to refer to a certain item. This can depend on | 17 | /// Find a path that can be used to refer to a certain item. This can depend on |
19 | /// *from where* you're referring to the item, hence the `from` parameter. | 18 | /// *from where* you're referring to the item, hence the `from` parameter. |
20 | pub fn find_path(db: &dyn DefDatabase, item: ItemInNs, from: ModuleId) -> Option<ModPath> { | 19 | pub fn find_path(db: &dyn DefDatabase, item: ItemInNs, from: ModuleId) -> Option<ModPath> { |
21 | let _p = profile("find_path"); | 20 | let _p = profile::span("find_path"); |
22 | find_path_inner(db, item, from, MAX_PATH_LEN) | 21 | find_path_inner(db, item, from, MAX_PATH_LEN) |
23 | } | 22 | } |
24 | 23 | ||
@@ -215,7 +214,7 @@ fn find_local_import_locations( | |||
215 | item: ItemInNs, | 214 | item: ItemInNs, |
216 | from: ModuleId, | 215 | from: ModuleId, |
217 | ) -> Vec<(ModuleId, Name)> { | 216 | ) -> Vec<(ModuleId, Name)> { |
218 | let _p = profile("find_local_import_locations"); | 217 | let _p = profile::span("find_local_import_locations"); |
219 | 218 | ||
220 | // `from` can import anything below `from` with visibility of at least `from`, and anything | 219 | // `from` can import anything below `from` with visibility of at least `from`, and anything |
221 | // above `from` with any visibility. That means we do not need to descend into private siblings | 220 | // above `from` with any visibility. That means we do not need to descend into private siblings |
diff --git a/crates/ra_hir_def/src/generics.rs b/crates/ra_hir_def/src/generics.rs index 699ba9c92..0e06a0b12 100644 --- a/crates/ra_hir_def/src/generics.rs +++ b/crates/ra_hir_def/src/generics.rs | |||
@@ -4,14 +4,13 @@ | |||
4 | //! in rustc. | 4 | //! in rustc. |
5 | use std::sync::Arc; | 5 | use std::sync::Arc; |
6 | 6 | ||
7 | use arena::{map::ArenaMap, Arena}; | ||
7 | use either::Either; | 8 | use either::Either; |
8 | use hir_expand::{ | 9 | use hir_expand::{ |
9 | name::{name, AsName, Name}, | 10 | name::{name, AsName, Name}, |
10 | InFile, | 11 | InFile, |
11 | }; | 12 | }; |
12 | use ra_arena::{map::ArenaMap, Arena}; | ||
13 | use ra_db::FileId; | 13 | use ra_db::FileId; |
14 | use ra_prof::profile; | ||
15 | use ra_syntax::ast::{self, GenericParamsOwner, NameOwner, TypeBoundsOwner}; | 14 | use ra_syntax::ast::{self, GenericParamsOwner, NameOwner, TypeBoundsOwner}; |
16 | 15 | ||
17 | use crate::{ | 16 | use crate::{ |
@@ -73,7 +72,7 @@ impl GenericParams { | |||
73 | db: &dyn DefDatabase, | 72 | db: &dyn DefDatabase, |
74 | def: GenericDefId, | 73 | def: GenericDefId, |
75 | ) -> Arc<GenericParams> { | 74 | ) -> Arc<GenericParams> { |
76 | let _p = profile("generic_params_query"); | 75 | let _p = profile::span("generic_params_query"); |
77 | 76 | ||
78 | let generics = match def { | 77 | let generics = match def { |
79 | GenericDefId::FunctionId(id) => { | 78 | GenericDefId::FunctionId(id) => { |
diff --git a/crates/ra_hir_def/src/import_map.rs b/crates/ra_hir_def/src/import_map.rs index 9e4c30b1a..3a9eec887 100644 --- a/crates/ra_hir_def/src/import_map.rs +++ b/crates/ra_hir_def/src/import_map.rs | |||
@@ -56,7 +56,7 @@ pub struct ImportMap { | |||
56 | 56 | ||
57 | impl ImportMap { | 57 | impl ImportMap { |
58 | pub fn import_map_query(db: &dyn DefDatabase, krate: CrateId) -> Arc<Self> { | 58 | pub fn import_map_query(db: &dyn DefDatabase, krate: CrateId) -> Arc<Self> { |
59 | let _p = ra_prof::profile("import_map_query"); | 59 | let _p = profile::span("import_map_query"); |
60 | let def_map = db.crate_def_map(krate); | 60 | let def_map = db.crate_def_map(krate); |
61 | let mut import_map = Self::default(); | 61 | let mut import_map = Self::default(); |
62 | 62 | ||
@@ -254,7 +254,7 @@ pub fn search_dependencies<'a>( | |||
254 | krate: CrateId, | 254 | krate: CrateId, |
255 | query: Query, | 255 | query: Query, |
256 | ) -> Vec<ItemInNs> { | 256 | ) -> Vec<ItemInNs> { |
257 | let _p = ra_prof::profile("search_dependencies").detail(|| format!("{:?}", query)); | 257 | let _p = profile::span("search_dependencies").detail(|| format!("{:?}", query)); |
258 | 258 | ||
259 | let graph = db.crate_graph(); | 259 | let graph = db.crate_graph(); |
260 | let import_maps: Vec<_> = | 260 | let import_maps: Vec<_> = |
diff --git a/crates/ra_hir_def/src/item_tree.rs b/crates/ra_hir_def/src/item_tree.rs index a67e75dac..104966c7f 100644 --- a/crates/ra_hir_def/src/item_tree.rs +++ b/crates/ra_hir_def/src/item_tree.rs | |||
@@ -13,6 +13,7 @@ use std::{ | |||
13 | sync::Arc, | 13 | sync::Arc, |
14 | }; | 14 | }; |
15 | 15 | ||
16 | use arena::{Arena, Idx, RawId}; | ||
16 | use ast::{AstNode, AttrsOwner, NameOwner, StructKind}; | 17 | use ast::{AstNode, AttrsOwner, NameOwner, StructKind}; |
17 | use either::Either; | 18 | use either::Either; |
18 | use hir_expand::{ | 19 | use hir_expand::{ |
@@ -21,7 +22,6 @@ use hir_expand::{ | |||
21 | name::{name, AsName, Name}, | 22 | name::{name, AsName, Name}, |
22 | HirFileId, InFile, | 23 | HirFileId, InFile, |
23 | }; | 24 | }; |
24 | use ra_arena::{Arena, Idx, RawId}; | ||
25 | use ra_syntax::{ast, match_ast}; | 25 | use ra_syntax::{ast, match_ast}; |
26 | use rustc_hash::FxHashMap; | 26 | use rustc_hash::FxHashMap; |
27 | use smallvec::SmallVec; | 27 | use smallvec::SmallVec; |
@@ -77,7 +77,7 @@ pub struct ItemTree { | |||
77 | 77 | ||
78 | impl ItemTree { | 78 | impl ItemTree { |
79 | pub fn item_tree_query(db: &dyn DefDatabase, file_id: HirFileId) -> Arc<ItemTree> { | 79 | pub fn item_tree_query(db: &dyn DefDatabase, file_id: HirFileId) -> Arc<ItemTree> { |
80 | let _p = ra_prof::profile("item_tree_query").detail(|| format!("{:?}", file_id)); | 80 | let _p = profile::span("item_tree_query").detail(|| format!("{:?}", file_id)); |
81 | let syntax = if let Some(node) = db.parse_or_expand(file_id) { | 81 | let syntax = if let Some(node) = db.parse_or_expand(file_id) { |
82 | node | 82 | node |
83 | } else { | 83 | } else { |
diff --git a/crates/ra_hir_def/src/item_tree/lower.rs b/crates/ra_hir_def/src/item_tree/lower.rs index 450ef8798..4523d0fbb 100644 --- a/crates/ra_hir_def/src/item_tree/lower.rs +++ b/crates/ra_hir_def/src/item_tree/lower.rs | |||
@@ -2,8 +2,8 @@ | |||
2 | 2 | ||
3 | use std::{collections::hash_map::Entry, mem, sync::Arc}; | 3 | use std::{collections::hash_map::Entry, mem, sync::Arc}; |
4 | 4 | ||
5 | use arena::map::ArenaMap; | ||
5 | use hir_expand::{ast_id_map::AstIdMap, hygiene::Hygiene, HirFileId}; | 6 | use hir_expand::{ast_id_map::AstIdMap, hygiene::Hygiene, HirFileId}; |
6 | use ra_arena::map::ArenaMap; | ||
7 | use ra_syntax::{ | 7 | use ra_syntax::{ |
8 | ast::{self, ModuleItemOwner}, | 8 | ast::{self, ModuleItemOwner}, |
9 | SyntaxNode, | 9 | SyntaxNode, |
diff --git a/crates/ra_hir_def/src/lang_item.rs b/crates/ra_hir_def/src/lang_item.rs index 3516784b8..3631499bf 100644 --- a/crates/ra_hir_def/src/lang_item.rs +++ b/crates/ra_hir_def/src/lang_item.rs | |||
@@ -4,7 +4,6 @@ | |||
4 | //! features, such as Fn family of traits. | 4 | //! features, such as Fn family of traits. |
5 | use std::sync::Arc; | 5 | use std::sync::Arc; |
6 | 6 | ||
7 | use ra_prof::profile; | ||
8 | use ra_syntax::SmolStr; | 7 | use ra_syntax::SmolStr; |
9 | use rustc_hash::FxHashMap; | 8 | use rustc_hash::FxHashMap; |
10 | 9 | ||
@@ -79,7 +78,7 @@ impl LangItems { | |||
79 | 78 | ||
80 | /// Salsa query. This will look for lang items in a specific crate. | 79 | /// Salsa query. This will look for lang items in a specific crate. |
81 | pub(crate) fn crate_lang_items_query(db: &dyn DefDatabase, krate: CrateId) -> Arc<LangItems> { | 80 | pub(crate) fn crate_lang_items_query(db: &dyn DefDatabase, krate: CrateId) -> Arc<LangItems> { |
82 | let _p = profile("crate_lang_items_query"); | 81 | let _p = profile::span("crate_lang_items_query"); |
83 | 82 | ||
84 | let mut lang_items = LangItems::default(); | 83 | let mut lang_items = LangItems::default(); |
85 | 84 | ||
@@ -98,7 +97,7 @@ impl LangItems { | |||
98 | db: &dyn DefDatabase, | 97 | db: &dyn DefDatabase, |
99 | module: ModuleId, | 98 | module: ModuleId, |
100 | ) -> Option<Arc<LangItems>> { | 99 | ) -> Option<Arc<LangItems>> { |
101 | let _p = profile("module_lang_items_query"); | 100 | let _p = profile::span("module_lang_items_query"); |
102 | let mut lang_items = LangItems::default(); | 101 | let mut lang_items = LangItems::default(); |
103 | lang_items.collect_lang_items(db, module); | 102 | lang_items.collect_lang_items(db, module); |
104 | if lang_items.items.is_empty() { | 103 | if lang_items.items.is_empty() { |
@@ -115,7 +114,7 @@ impl LangItems { | |||
115 | start_crate: CrateId, | 114 | start_crate: CrateId, |
116 | item: SmolStr, | 115 | item: SmolStr, |
117 | ) -> Option<LangItemTarget> { | 116 | ) -> Option<LangItemTarget> { |
118 | let _p = profile("lang_item_query"); | 117 | let _p = profile::span("lang_item_query"); |
119 | let lang_items = db.crate_lang_items(start_crate); | 118 | let lang_items = db.crate_lang_items(start_crate); |
120 | let start_crate_target = lang_items.items.get(&item); | 119 | let start_crate_target = lang_items.items.get(&item); |
121 | if let Some(target) = start_crate_target { | 120 | if let Some(target) = start_crate_target { |
diff --git a/crates/ra_hir_def/src/lib.rs b/crates/ra_hir_def/src/lib.rs index 237b1038a..810393739 100644 --- a/crates/ra_hir_def/src/lib.rs +++ b/crates/ra_hir_def/src/lib.rs | |||
@@ -52,11 +52,11 @@ mod test_db; | |||
52 | 52 | ||
53 | use std::hash::{Hash, Hasher}; | 53 | use std::hash::{Hash, Hasher}; |
54 | 54 | ||
55 | use arena::Idx; | ||
55 | use hir_expand::{ | 56 | use hir_expand::{ |
56 | ast_id_map::FileAstId, eager::expand_eager_macro, hygiene::Hygiene, AstId, HirFileId, InFile, | 57 | ast_id_map::FileAstId, eager::expand_eager_macro, hygiene::Hygiene, AstId, HirFileId, InFile, |
57 | MacroCallId, MacroCallKind, MacroDefId, MacroDefKind, | 58 | MacroCallId, MacroCallKind, MacroDefId, MacroDefKind, |
58 | }; | 59 | }; |
59 | use ra_arena::Idx; | ||
60 | use ra_db::{impl_intern_key, salsa, CrateId}; | 60 | use ra_db::{impl_intern_key, salsa, CrateId}; |
61 | use ra_syntax::ast; | 61 | use ra_syntax::ast; |
62 | 62 | ||
diff --git a/crates/ra_hir_def/src/nameres.rs b/crates/ra_hir_def/src/nameres.rs index 3d9b55a73..dc239997f 100644 --- a/crates/ra_hir_def/src/nameres.rs +++ b/crates/ra_hir_def/src/nameres.rs | |||
@@ -56,10 +56,9 @@ mod tests; | |||
56 | 56 | ||
57 | use std::sync::Arc; | 57 | use std::sync::Arc; |
58 | 58 | ||
59 | use arena::Arena; | ||
59 | use hir_expand::{diagnostics::DiagnosticSink, name::Name, InFile}; | 60 | use hir_expand::{diagnostics::DiagnosticSink, name::Name, InFile}; |
60 | use ra_arena::Arena; | ||
61 | use ra_db::{CrateId, Edition, FileId}; | 61 | use ra_db::{CrateId, Edition, FileId}; |
62 | use ra_prof::profile; | ||
63 | use ra_syntax::ast; | 62 | use ra_syntax::ast; |
64 | use rustc_hash::FxHashMap; | 63 | use rustc_hash::FxHashMap; |
65 | use stdx::format_to; | 64 | use stdx::format_to; |
@@ -172,7 +171,7 @@ pub struct ModuleData { | |||
172 | 171 | ||
173 | impl CrateDefMap { | 172 | impl CrateDefMap { |
174 | pub(crate) fn crate_def_map_query(db: &dyn DefDatabase, krate: CrateId) -> Arc<CrateDefMap> { | 173 | pub(crate) fn crate_def_map_query(db: &dyn DefDatabase, krate: CrateId) -> Arc<CrateDefMap> { |
175 | let _p = profile("crate_def_map_query").detail(|| { | 174 | let _p = profile::span("crate_def_map_query").detail(|| { |
176 | db.crate_graph()[krate] | 175 | db.crate_graph()[krate] |
177 | .display_name | 176 | .display_name |
178 | .as_ref() | 177 | .as_ref() |
diff --git a/crates/ra_hir_def/src/nameres/collector.rs b/crates/ra_hir_def/src/nameres/collector.rs index 28b7a20c5..52ee401d9 100644 --- a/crates/ra_hir_def/src/nameres/collector.rs +++ b/crates/ra_hir_def/src/nameres/collector.rs | |||
@@ -1208,7 +1208,7 @@ fn is_macro_rules(path: &ModPath) -> bool { | |||
1208 | #[cfg(test)] | 1208 | #[cfg(test)] |
1209 | mod tests { | 1209 | mod tests { |
1210 | use crate::{db::DefDatabase, test_db::TestDB}; | 1210 | use crate::{db::DefDatabase, test_db::TestDB}; |
1211 | use ra_arena::Arena; | 1211 | use arena::Arena; |
1212 | use ra_db::{fixture::WithFixture, SourceDatabase}; | 1212 | use ra_db::{fixture::WithFixture, SourceDatabase}; |
1213 | 1213 | ||
1214 | use super::*; | 1214 | use super::*; |
diff --git a/crates/ra_hir_def/src/src.rs b/crates/ra_hir_def/src/src.rs index 043b93fad..7a79b0314 100644 --- a/crates/ra_hir_def/src/src.rs +++ b/crates/ra_hir_def/src/src.rs | |||
@@ -1,7 +1,7 @@ | |||
1 | //! Utilities for mapping between hir IDs and the surface syntax. | 1 | //! Utilities for mapping between hir IDs and the surface syntax. |
2 | 2 | ||
3 | use arena::map::ArenaMap; | ||
3 | use hir_expand::InFile; | 4 | use hir_expand::InFile; |
4 | use ra_arena::map::ArenaMap; | ||
5 | 5 | ||
6 | use crate::{db::DefDatabase, item_tree::ItemTreeNode, AssocItemLoc, ItemLoc}; | 6 | use crate::{db::DefDatabase, item_tree::ItemTreeNode, AssocItemLoc, ItemLoc}; |
7 | 7 | ||
diff --git a/crates/ra_hir_def/src/trace.rs b/crates/ra_hir_def/src/trace.rs index ced07577d..fd64e7018 100644 --- a/crates/ra_hir_def/src/trace.rs +++ b/crates/ra_hir_def/src/trace.rs | |||
@@ -9,7 +9,7 @@ | |||
9 | //! absolute offsets. The `Trace` structure (inspired, at least in name, by | 9 | //! absolute offsets. The `Trace` structure (inspired, at least in name, by |
10 | //! Kotlin's `BindingTrace`) allows use the same code to compute both | 10 | //! Kotlin's `BindingTrace`) allows use the same code to compute both |
11 | //! projections. | 11 | //! projections. |
12 | use ra_arena::{map::ArenaMap, Arena, Idx, RawId}; | 12 | use arena::{map::ArenaMap, Arena, Idx, RawId}; |
13 | 13 | ||
14 | pub(crate) struct Trace<T, V> { | 14 | pub(crate) struct Trace<T, V> { |
15 | arena: Option<Arena<T>>, | 15 | arena: Option<Arena<T>>, |