diff options
Diffstat (limited to 'crates/ra_hir/src/ty')
-rw-r--r-- | crates/ra_hir/src/ty/infer.rs | 4 | ||||
-rw-r--r-- | crates/ra_hir/src/ty/traits.rs | 2 |
2 files changed, 5 insertions, 1 deletions
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}; | |||
23 | use rustc_hash::FxHashMap; | 23 | use rustc_hash::FxHashMap; |
24 | 24 | ||
25 | use ra_arena::map::ArenaMap; | 25 | use ra_arena::map::ArenaMap; |
26 | use ra_prof::profile; | ||
26 | use test_utils::tested_by; | 27 | use test_utils::tested_by; |
27 | 28 | ||
28 | use crate::{ | 29 | use crate::{ |
@@ -51,7 +52,8 @@ use super::{ | |||
51 | mod unify; | 52 | mod unify; |
52 | 53 | ||
53 | /// The entry point of type inference. | 54 | /// The entry point of type inference. |
54 | pub fn infer(db: &impl HirDatabase, def: DefWithBody) -> Arc<InferenceResult> { | 55 | pub fn infer_query(db: &impl HirDatabase, def: DefWithBody) -> Arc<InferenceResult> { |
56 | let _p = profile("infer_query"); | ||
55 | db.check_canceled(); | 57 | db.check_canceled(); |
56 | let body = def.body(db); | 58 | let body = def.body(db); |
57 | let resolver = def.resolver(db); | 59 | let resolver = def.resolver(db); |
diff --git a/crates/ra_hir/src/ty/traits.rs b/crates/ra_hir/src/ty/traits.rs index 190d018ff..f39749cab 100644 --- a/crates/ra_hir/src/ty/traits.rs +++ b/crates/ra_hir/src/ty/traits.rs | |||
@@ -4,6 +4,7 @@ use std::sync::{Arc, Mutex}; | |||
4 | use rustc_hash::FxHashSet; | 4 | use rustc_hash::FxHashSet; |
5 | use log::debug; | 5 | use log::debug; |
6 | use chalk_ir::cast::Cast; | 6 | use chalk_ir::cast::Cast; |
7 | use ra_prof::profile; | ||
7 | 8 | ||
8 | use crate::{Crate, Trait, db::HirDatabase, ImplBlock}; | 9 | use crate::{Crate, Trait, db::HirDatabase, ImplBlock}; |
9 | use super::{TraitRef, Ty, Canonical}; | 10 | use super::{TraitRef, Ty, Canonical}; |
@@ -81,6 +82,7 @@ pub(crate) fn implements_query( | |||
81 | krate: Crate, | 82 | krate: Crate, |
82 | trait_ref: Canonical<TraitRef>, | 83 | trait_ref: Canonical<TraitRef>, |
83 | ) -> Option<Solution> { | 84 | ) -> Option<Solution> { |
85 | let _p = profile("implements_query"); | ||
84 | let goal: chalk_ir::Goal = trait_ref.value.to_chalk(db).cast(); | 86 | let goal: chalk_ir::Goal = trait_ref.value.to_chalk(db).cast(); |
85 | debug!("goal: {:?}", goal); | 87 | debug!("goal: {:?}", goal); |
86 | let env = chalk_ir::Environment::new(); | 88 | let env = chalk_ir::Environment::new(); |