From f63be060027cf25ce1c64bd02dab2931fc1ceafe Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 21 May 2019 16:24:53 +0300 Subject: profile type inference --- crates/ra_hir/src/ty/infer.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'crates/ra_hir/src/ty/infer.rs') diff --git a/crates/ra_hir/src/ty/infer.rs b/crates/ra_hir/src/ty/infer.rs index 1e7d97f51..a48272981 100644 --- a/crates/ra_hir/src/ty/infer.rs +++ b/crates/ra_hir/src/ty/infer.rs @@ -23,6 +23,7 @@ use ena::unify::{InPlaceUnificationTable, UnifyKey, UnifyValue, NoError}; use rustc_hash::FxHashMap; use ra_arena::map::ArenaMap; +use ra_prof::profile; use test_utils::tested_by; use crate::{ @@ -51,7 +52,8 @@ use super::{ mod unify; /// The entry point of type inference. -pub fn infer(db: &impl HirDatabase, def: DefWithBody) -> Arc { +pub fn infer_query(db: &impl HirDatabase, def: DefWithBody) -> Arc { + let _p = profile("infer_query"); db.check_canceled(); let body = def.body(db); let resolver = def.resolver(db); -- cgit v1.2.3