aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_hir/src/code_model.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs
index 488f74cfb..cc42068a1 100644
--- a/crates/ra_hir/src/code_model.rs
+++ b/crates/ra_hir/src/code_model.rs
@@ -25,6 +25,7 @@ use hir_ty::{
25 TraitEnvironment, Ty, TyDefId, TypeCtor, TypeWalk, 25 TraitEnvironment, Ty, TyDefId, TypeCtor, TypeWalk,
26}; 26};
27use ra_db::{CrateId, Edition, FileId}; 27use ra_db::{CrateId, Edition, FileId};
28use ra_prof::profile;
28use ra_syntax::ast; 29use ra_syntax::ast;
29 30
30use crate::{ 31use crate::{
@@ -189,6 +190,7 @@ impl Module {
189 } 190 }
190 191
191 pub fn diagnostics(self, db: &impl HirDatabase, sink: &mut DiagnosticSink) { 192 pub fn diagnostics(self, db: &impl HirDatabase, sink: &mut DiagnosticSink) {
193 let _p = profile("Module::diagnostics");
192 db.crate_def_map(self.id.krate).add_diagnostics(db, self.id.local_id, sink); 194 db.crate_def_map(self.id.krate).add_diagnostics(db, self.id.local_id, sink);
193 for decl in self.declarations(db) { 195 for decl in self.declarations(db) {
194 match decl { 196 match decl {
@@ -507,6 +509,7 @@ impl Function {
507 } 509 }
508 510
509 pub fn diagnostics(self, db: &impl HirDatabase, sink: &mut DiagnosticSink) { 511 pub fn diagnostics(self, db: &impl HirDatabase, sink: &mut DiagnosticSink) {
512 let _p = profile("Function::diagnostics");
510 let infer = db.infer(self.id.into()); 513 let infer = db.infer(self.id.into());
511 infer.add_diagnostics(db, self.id, sink); 514 infer.add_diagnostics(db, self.id, sink);
512 let mut validator = ExprValidator::new(self.id, infer, sink); 515 let mut validator = ExprValidator::new(self.id, infer, sink);