From 93dc6f511bedb7c18319bbf3efe47a7db4b2aa53 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Fri, 23 Oct 2020 19:27:04 +0200 Subject: Diagnose #[cfg]s in bodies --- crates/hir/src/code_model.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'crates/hir') diff --git a/crates/hir/src/code_model.rs b/crates/hir/src/code_model.rs index 7f169ccd2..864f9c0c8 100644 --- a/crates/hir/src/code_model.rs +++ b/crates/hir/src/code_model.rs @@ -781,6 +781,7 @@ impl Function { } pub fn diagnostics(self, db: &dyn HirDatabase, sink: &mut DiagnosticSink) { + hir_def::diagnostics::validate_body(db.upcast(), self.id.into(), sink); hir_ty::diagnostics::validate_module_item(db, self.id.into(), sink); hir_ty::diagnostics::validate_body(db, self.id.into(), sink); } -- cgit v1.2.3