diff options
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r-- | crates/ra_hir/src/code_model.rs | 3 | ||||
-rw-r--r-- | crates/ra_hir/src/db.rs | 18 |
2 files changed, 12 insertions, 9 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 | }; |
27 | use ra_db::{CrateId, Edition, FileId}; | 27 | use ra_db::{CrateId, Edition, FileId}; |
28 | use ra_prof::profile; | ||
28 | use ra_syntax::ast; | 29 | use ra_syntax::ast; |
29 | 30 | ||
30 | use crate::{ | 31 | use 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); |
diff --git a/crates/ra_hir/src/db.rs b/crates/ra_hir/src/db.rs index f5ffd64fa..e6079b88d 100644 --- a/crates/ra_hir/src/db.rs +++ b/crates/ra_hir/src/db.rs | |||
@@ -1,21 +1,21 @@ | |||
1 | //! FIXME: write short doc here | 1 | //! FIXME: write short doc here |
2 | 2 | ||
3 | pub use hir_def::db::{ | 3 | pub use hir_def::db::{ |
4 | BodyQuery, BodyWithSourceMapQuery, ConstDataQuery, CrateDefMapQuery, CrateLangItemsQuery, | 4 | BodyQuery, BodyWithSourceMapQuery, ComputeCrateDefMapQuery, ConstDataQuery, |
5 | DefDatabase, DefDatabaseStorage, DocumentationQuery, EnumDataQuery, ExprScopesQuery, | 5 | CrateLangItemsQuery, DefDatabase, DefDatabaseStorage, DocumentationQuery, EnumDataQuery, |
6 | FunctionDataQuery, GenericParamsQuery, ImplDataQuery, InternDatabase, InternDatabaseStorage, | 6 | ExprScopesQuery, FunctionDataQuery, GenericParamsQuery, ImplDataQuery, InternDatabase, |
7 | LangItemQuery, ModuleLangItemsQuery, RawItemsQuery, StaticDataQuery, StructDataQuery, | 7 | InternDatabaseStorage, LangItemQuery, ModuleLangItemsQuery, RawItemsQuery, StaticDataQuery, |
8 | TraitDataQuery, TypeAliasDataQuery, | 8 | StructDataQuery, TraitDataQuery, TypeAliasDataQuery, |
9 | }; | 9 | }; |
10 | pub use hir_expand::db::{ | 10 | pub use hir_expand::db::{ |
11 | AstDatabase, AstDatabaseStorage, AstIdMapQuery, MacroArgQuery, MacroDefQuery, MacroExpandQuery, | 11 | AstDatabase, AstDatabaseStorage, AstIdMapQuery, MacroArgQuery, MacroDefQuery, MacroExpandQuery, |
12 | ParseMacroQuery, | 12 | ParseMacroQuery, |
13 | }; | 13 | }; |
14 | pub use hir_ty::db::{ | 14 | pub use hir_ty::db::{ |
15 | AssociatedTyDataQuery, CallableItemSignatureQuery, FieldTypesQuery, GenericDefaultsQuery, | 15 | AssociatedTyDataQuery, CallableItemSignatureQuery, DoInferQuery, FieldTypesQuery, |
16 | GenericPredicatesQuery, HirDatabase, HirDatabaseStorage, ImplDatumQuery, ImplsForTraitQuery, | 16 | GenericDefaultsQuery, GenericPredicatesQuery, HirDatabase, HirDatabaseStorage, ImplDatumQuery, |
17 | ImplsInCrateQuery, InferQuery, StructDatumQuery, TraitDatumQuery, TraitSolveQuery, TyQuery, | 17 | ImplsForTraitQuery, ImplsInCrateQuery, StructDatumQuery, TraitDatumQuery, TraitSolveQuery, |
18 | ValueTyQuery, | 18 | TyQuery, ValueTyQuery, |
19 | }; | 19 | }; |
20 | 20 | ||
21 | #[test] | 21 | #[test] |