From 181590412ecfc2e80588c424a98613c8bc42e4f9 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 27 Jan 2021 12:16:24 +0300 Subject: add more counts --- crates/hir_expand/src/ast_id_map.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'crates/hir_expand/src/ast_id_map.rs') diff --git a/crates/hir_expand/src/ast_id_map.rs b/crates/hir_expand/src/ast_id_map.rs index 0991fffd8..16cf29907 100644 --- a/crates/hir_expand/src/ast_id_map.rs +++ b/crates/hir_expand/src/ast_id_map.rs @@ -13,6 +13,7 @@ use std::{ }; use la_arena::{Arena, Idx}; +use profile::Count; use syntax::{ast, match_ast, AstNode, AstPtr, SyntaxNode, SyntaxNodePtr}; /// `AstId` points to an AST node in a specific file. @@ -62,12 +63,13 @@ type ErasedFileAstId = Idx; #[derive(Debug, PartialEq, Eq, Default)] pub struct AstIdMap { arena: Arena, + _c: Count, } impl AstIdMap { pub(crate) fn from_source(node: &SyntaxNode) -> AstIdMap { assert!(node.parent().is_none()); - let mut res = AstIdMap { arena: Arena::default() }; + let mut res = AstIdMap::default(); // By walking the tree in breadth-first order we make sure that parents // get lower ids then children. That is, adding a new child does not // change parent's id. This means that, say, adding a new function to a -- cgit v1.2.3