mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
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:
commit
57ef70cc08
4 changed files with 22 additions and 33 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue