diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-03-06 23:21:49 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-03-06 23:21:49 +0000 |
commit | 07a54f7ae451451292e3282f1e7defb4391b766f (patch) | |
tree | 296a5f2b2aff6f74eb3cc5db851d59bea5cc3889 /crates/hir/src | |
parent | c44575b4857e2d97067afab7df1f98042aa591c4 (diff) | |
parent | 6750c11df33868ffac07af4c8d4b050331663f5e (diff) |
Merge #7899
7899: Rename a few `crate_def_map`s to `def_map` r=jonas-schievink a=jonas-schievink
These could all be block `DefMap`s instead of crate-level `DefMap`s
bors r+
Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/hir/src')
-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 | } |