fix: Diagnose everything in nested items, not just def diagnostics

This commit is contained in:
Lukas Wirth 2023-11-15 09:46:07 +01:00
parent 723d799ec1
commit 498f39eae2
4 changed files with 22 additions and 33 deletions

View file

@ -1536,9 +1536,7 @@ impl DefWithBody {
let (body, source_map) = db.body_with_source_map(self.into());
for (_, def_map) in body.blocks(db.upcast()) {
for diag in def_map.diagnostics() {
emit_def_diagnostic(db, acc, diag);
}
Module { id: def_map.module_id(DefMap::ROOT) }.diagnostics(db, acc);
}
for diag in source_map.diagnostics() {