From 6750c11df33868ffac07af4c8d4b050331663f5e Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Sun, 7 Mar 2021 00:20:13 +0100 Subject: Rename a few `crate_def_map`s to `def_map` These could all be block `DefMap`s instead of crate-level `DefMap`s --- crates/hir/src/code_model.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/hir/src') 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 { let _p = profile::span("Module::diagnostics").detail(|| { format!("{:?}", self.name(db).map_or("".into(), |name| name.to_string())) }); - let crate_def_map = self.id.def_map(db.upcast()); - crate_def_map.add_diagnostics(db.upcast(), self.id.local_id, sink); + let def_map = self.id.def_map(db.upcast()); + def_map.add_diagnostics(db.upcast(), self.id.local_id, sink); for decl in self.declarations(db) { match decl { crate::ModuleDef::Function(f) => f.diagnostics(db, sink), crate::ModuleDef::Module(m) => { // Only add diagnostics from inline modules - if crate_def_map[m.id.local_id].origin.is_inline() { + if def_map[m.id.local_id].origin.is_inline() { m.diagnostics(db, sink) } } -- cgit v1.2.3