Auto merge of #15901 - Veykril:inner-diag, r=lnicola

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

Turns out we only calculated def diagnostics for these before (was wondering why I wasn't getting any type mismatches)
This commit is contained in:
bors 2023-11-15 10:07:15 +00:00
commit 57ef70cc08
4 changed files with 22 additions and 33 deletions

View file

@ -1537,9 +1537,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() {