diff options
author | Jonas Schievink <[email protected]> | 2021-03-06 23:20:13 +0000 |
---|---|---|
committer | Jonas Schievink <[email protected]> | 2021-03-06 23:20:13 +0000 |
commit | 6750c11df33868ffac07af4c8d4b050331663f5e (patch) | |
tree | 296a5f2b2aff6f74eb3cc5db851d59bea5cc3889 /crates/hir | |
parent | c44575b4857e2d97067afab7df1f98042aa591c4 (diff) |
Rename a few `crate_def_map`s to `def_map`
These could all be block `DefMap`s instead of crate-level `DefMap`s
Diffstat (limited to 'crates/hir')
-rw-r--r-- | crates/hir/src/code_model.rs | 6 |
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 | } |