From 45fbab2b1ac02dab971d245c45c2404494cb3e03 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 23 Mar 2019 21:17:05 +0300 Subject: check impls as well --- crates/ra_ide_api/src/diagnostics.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'crates/ra_ide_api') diff --git a/crates/ra_ide_api/src/diagnostics.rs b/crates/ra_ide_api/src/diagnostics.rs index 1395cede2..e03dcaa8f 100644 --- a/crates/ra_ide_api/src/diagnostics.rs +++ b/crates/ra_ide_api/src/diagnostics.rs @@ -138,6 +138,15 @@ fn check_module(acc: &mut Vec, db: &RootDatabase, module: hir::Modul } } + for impl_block in module.impl_blocks(db) { + for item in impl_block.items(db) { + match item { + hir::ImplItem::Method(f) => f.diagnostics(db, &mut diagnostics), + _ => (), + } + } + } + for d in diagnostics.into_diagnostics().iter() { if let Some(d) = d.downcast_ref::() { let source_root = db.file_source_root(d.file().original_file(db)); -- cgit v1.2.3