aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-07-14 09:28:55 +0100
committerAleksey Kladov <[email protected]>2020-07-14 09:28:55 +0100
commit19450534cf308eff30ea7de1a40ab77dca4e6014 (patch)
treec2becab63418e6ffd88af4bfdd1b129b305cff6d /crates/ra_hir
parent1fdbf81181356854b692fe0407bac75aba6ea942 (diff)
Cleanup hir diagnostics API
Diffstat (limited to 'crates/ra_hir')
-rw-r--r--crates/ra_hir/src/code_model.rs9
1 files changed, 1 insertions, 8 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs
index dbda25d1d..42c9ca189 100644
--- a/crates/ra_hir/src/code_model.rs
+++ b/crates/ra_hir/src/code_model.rs
@@ -24,7 +24,6 @@ use hir_expand::{
24}; 24};
25use hir_ty::{ 25use hir_ty::{
26 autoderef, 26 autoderef,
27 diagnostics::{expr::ExprValidator, unsafe_check::UnsafeValidator},
28 display::{HirDisplayError, HirFormatter}, 27 display::{HirDisplayError, HirFormatter},
29 method_resolution, ApplicationTy, Canonical, GenericPredicate, InEnvironment, Substs, 28 method_resolution, ApplicationTy, Canonical, GenericPredicate, InEnvironment, Substs,
30 TraitEnvironment, Ty, TyDefId, TypeCtor, 29 TraitEnvironment, Ty, TyDefId, TypeCtor,
@@ -678,13 +677,7 @@ impl Function {
678 } 677 }
679 678
680 pub fn diagnostics(self, db: &dyn HirDatabase, sink: &mut DiagnosticSink) { 679 pub fn diagnostics(self, db: &dyn HirDatabase, sink: &mut DiagnosticSink) {
681 let _p = profile("Function::diagnostics"); 680 hir_ty::diagnostics::validate_body(db, self.id.into(), sink)
682 let infer = db.infer(self.id.into());
683 infer.add_diagnostics(db, self.id, sink);
684 let mut validator = ExprValidator::new(self.id, infer.clone(), sink);
685 validator.validate_body(db);
686 let mut validator = UnsafeValidator::new(self.id, infer, sink);
687 validator.validate_body(db);
688 } 681 }
689} 682}
690 683