diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-01-27 09:16:54 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-01-27 09:16:54 +0000 |
commit | 2d3266d11145b907c554428f5af5d24d69591f92 (patch) | |
tree | a74131b92801f2b0126535069628af91dd238f08 /crates/hir_def | |
parent | fc08fdaf5a5e17af09eb6cfa098f7c3d4dc9114b (diff) | |
parent | 181590412ecfc2e80588c424a98613c8bc42e4f9 (diff) |
Merge #7460
7460: add more counts r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/hir_def')
-rw-r--r-- | crates/hir_def/src/body.rs | 2 | ||||
-rw-r--r-- | crates/hir_def/src/body/lower.rs | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/crates/hir_def/src/body.rs b/crates/hir_def/src/body.rs index d0c84ab0b..b9ecf22fa 100644 --- a/crates/hir_def/src/body.rs +++ b/crates/hir_def/src/body.rs | |||
@@ -17,6 +17,7 @@ use hir_expand::{ | |||
17 | HirFileId, InFile, MacroDefId, | 17 | HirFileId, InFile, MacroDefId, |
18 | }; | 18 | }; |
19 | use la_arena::{Arena, ArenaMap}; | 19 | use la_arena::{Arena, ArenaMap}; |
20 | use profile::Count; | ||
20 | use rustc_hash::FxHashMap; | 21 | use rustc_hash::FxHashMap; |
21 | use syntax::{ast, AstNode, AstPtr}; | 22 | use syntax::{ast, AstNode, AstPtr}; |
22 | use test_utils::mark; | 23 | use test_utils::mark; |
@@ -237,6 +238,7 @@ pub struct Body { | |||
237 | /// The `ExprId` of the actual body expression. | 238 | /// The `ExprId` of the actual body expression. |
238 | pub body_expr: ExprId, | 239 | pub body_expr: ExprId, |
239 | pub item_scope: ItemScope, | 240 | pub item_scope: ItemScope, |
241 | _c: Count<Self>, | ||
240 | } | 242 | } |
241 | 243 | ||
242 | pub type ExprPtr = AstPtr<ast::Expr>; | 244 | pub type ExprPtr = AstPtr<ast::Expr>; |
diff --git a/crates/hir_def/src/body/lower.rs b/crates/hir_def/src/body/lower.rs index 4ce5e5b72..209965fca 100644 --- a/crates/hir_def/src/body/lower.rs +++ b/crates/hir_def/src/body/lower.rs | |||
@@ -10,6 +10,7 @@ use hir_expand::{ | |||
10 | ExpandError, HirFileId, MacroDefId, MacroDefKind, | 10 | ExpandError, HirFileId, MacroDefId, MacroDefKind, |
11 | }; | 11 | }; |
12 | use la_arena::Arena; | 12 | use la_arena::Arena; |
13 | use profile::Count; | ||
13 | use rustc_hash::FxHashMap; | 14 | use rustc_hash::FxHashMap; |
14 | use syntax::{ | 15 | use syntax::{ |
15 | ast::{ | 16 | ast::{ |
@@ -77,6 +78,7 @@ pub(super) fn lower( | |||
77 | params: Vec::new(), | 78 | params: Vec::new(), |
78 | body_expr: dummy_expr_id(), | 79 | body_expr: dummy_expr_id(), |
79 | item_scope: Default::default(), | 80 | item_scope: Default::default(), |
81 | _c: Count::new(), | ||
80 | }, | 82 | }, |
81 | item_trees: { | 83 | item_trees: { |
82 | let mut map = FxHashMap::default(); | 84 | let mut map = FxHashMap::default(); |