diff options
author | Aleksey Kladov <[email protected]> | 2020-03-19 15:00:11 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-03-19 17:46:30 +0000 |
commit | f840fcb2f525c13809d6a736e434155edf075a06 (patch) | |
tree | ce3eb047dd9fe9005750a3b1417d95b1aa8fe01e /crates/ra_hir_def/src/nameres.rs | |
parent | 988f1dda6bde576ec2457dd97a7525014609c771 (diff) |
Simplify Arena to use a generic index
Diffstat (limited to 'crates/ra_hir_def/src/nameres.rs')
-rw-r--r-- | crates/ra_hir_def/src/nameres.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir_def/src/nameres.rs b/crates/ra_hir_def/src/nameres.rs index be53313ee..40bdc34f5 100644 --- a/crates/ra_hir_def/src/nameres.rs +++ b/crates/ra_hir_def/src/nameres.rs | |||
@@ -77,7 +77,7 @@ use crate::{ | |||
77 | #[derive(Debug, PartialEq, Eq)] | 77 | #[derive(Debug, PartialEq, Eq)] |
78 | pub struct CrateDefMap { | 78 | pub struct CrateDefMap { |
79 | pub root: LocalModuleId, | 79 | pub root: LocalModuleId, |
80 | pub modules: Arena<LocalModuleId, ModuleData>, | 80 | pub modules: Arena<ModuleData>, |
81 | pub(crate) krate: CrateId, | 81 | pub(crate) krate: CrateId, |
82 | /// The prelude module for this crate. This either comes from an import | 82 | /// The prelude module for this crate. This either comes from an import |
83 | /// marked with the `prelude_import` attribute, or (in the normal case) from | 83 | /// marked with the `prelude_import` attribute, or (in the normal case) from |
@@ -187,7 +187,7 @@ impl CrateDefMap { | |||
187 | }); | 187 | }); |
188 | let def_map = { | 188 | let def_map = { |
189 | let edition = db.crate_graph()[krate].edition; | 189 | let edition = db.crate_graph()[krate].edition; |
190 | let mut modules: Arena<LocalModuleId, ModuleData> = Arena::default(); | 190 | let mut modules: Arena<ModuleData> = Arena::default(); |
191 | let root = modules.alloc(ModuleData::default()); | 191 | let root = modules.alloc(ModuleData::default()); |
192 | CrateDefMap { | 192 | CrateDefMap { |
193 | krate, | 193 | krate, |