aboutsummaryrefslogtreecommitdiff
path: root/crates/hir/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir/src')
-rw-r--r--crates/hir/src/code_model.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir/src/code_model.rs b/crates/hir/src/code_model.rs
index 7656db974..9ee4b3059 100644
--- a/crates/hir/src/code_model.rs
+++ b/crates/hir/src/code_model.rs
@@ -365,14 +365,14 @@ impl Module {
365 let _p = profile::span("Module::diagnostics").detail(|| { 365 let _p = profile::span("Module::diagnostics").detail(|| {
366 format!("{:?}", self.name(db).map_or("<unknown>".into(), |name| name.to_string())) 366 format!("{:?}", self.name(db).map_or("<unknown>".into(), |name| name.to_string()))
367 }); 367 });
368 let crate_def_map = self.id.def_map(db.upcast()); 368 let def_map = self.id.def_map(db.upcast());
369 crate_def_map.add_diagnostics(db.upcast(), self.id.local_id, sink); 369 def_map.add_diagnostics(db.upcast(), self.id.local_id, sink);
370 for decl in self.declarations(db) { 370 for decl in self.declarations(db) {
371 match decl { 371 match decl {
372 crate::ModuleDef::Function(f) => f.diagnostics(db, sink), 372 crate::ModuleDef::Function(f) => f.diagnostics(db, sink),
373 crate::ModuleDef::Module(m) => { 373 crate::ModuleDef::Module(m) => {
374 // Only add diagnostics from inline modules 374 // Only add diagnostics from inline modules
375 if crate_def_map[m.id.local_id].origin.is_inline() { 375 if def_map[m.id.local_id].origin.is_inline() {
376 m.diagnostics(db, sink) 376 m.diagnostics(db, sink)
377 } 377 }
378 } 378 }