diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-12-21 17:46:52 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-12-21 17:46:52 +0000 |
commit | f874d6c475356b1dd40acd9c362c786dc76f7e28 (patch) | |
tree | 140737c65d55fc42f49345bbc45a46c54bccc02a /crates/ra_hir_def/src | |
parent | c59d10ab35f69d34c9e1ada34db43157467aced5 (diff) | |
parent | d4b135f38c8c0050768c50e62043ddca5f09079a (diff) |
Merge #2637
2637: Optimize and profile r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir_def/src')
-rw-r--r-- | crates/ra_hir_def/src/body.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/ra_hir_def/src/body.rs b/crates/ra_hir_def/src/body.rs index 445d215b7..148ff007e 100644 --- a/crates/ra_hir_def/src/body.rs +++ b/crates/ra_hir_def/src/body.rs | |||
@@ -11,6 +11,7 @@ use hir_expand::{ | |||
11 | ast_id_map::AstIdMap, hygiene::Hygiene, AstId, HirFileId, InFile, MacroCallKind, MacroDefId, | 11 | ast_id_map::AstIdMap, hygiene::Hygiene, AstId, HirFileId, InFile, MacroCallKind, MacroDefId, |
12 | }; | 12 | }; |
13 | use ra_arena::{map::ArenaMap, Arena}; | 13 | use ra_arena::{map::ArenaMap, Arena}; |
14 | use ra_prof::profile; | ||
14 | use ra_syntax::{ast, AstNode, AstPtr}; | 15 | use ra_syntax::{ast, AstNode, AstPtr}; |
15 | use rustc_hash::FxHashMap; | 16 | use rustc_hash::FxHashMap; |
16 | 17 | ||
@@ -168,6 +169,7 @@ impl Body { | |||
168 | db: &impl DefDatabase, | 169 | db: &impl DefDatabase, |
169 | def: DefWithBodyId, | 170 | def: DefWithBodyId, |
170 | ) -> (Arc<Body>, Arc<BodySourceMap>) { | 171 | ) -> (Arc<Body>, Arc<BodySourceMap>) { |
172 | let _p = profile("body_with_source_map_query"); | ||
171 | let mut params = None; | 173 | let mut params = None; |
172 | 174 | ||
173 | let (file_id, module, body) = match def { | 175 | let (file_id, module, body) = match def { |