aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_def/src')
-rw-r--r--crates/ra_hir_def/src/adt.rs4
-rw-r--r--crates/ra_hir_def/src/child_by_source.rs2
-rw-r--r--crates/ra_hir_def/src/item_tree/lower.rs4
-rw-r--r--crates/ra_hir_def/src/keys.rs2
4 files changed, 6 insertions, 6 deletions
diff --git a/crates/ra_hir_def/src/adt.rs b/crates/ra_hir_def/src/adt.rs
index df98ded62..231c1dfab 100644
--- a/crates/ra_hir_def/src/adt.rs
+++ b/crates/ra_hir_def/src/adt.rs
@@ -112,7 +112,7 @@ impl EnumData {
112 112
113impl HasChildSource for EnumId { 113impl HasChildSource for EnumId {
114 type ChildId = LocalEnumVariantId; 114 type ChildId = LocalEnumVariantId;
115 type Value = ast::EnumVariant; 115 type Value = ast::Variant;
116 fn child_source(&self, db: &dyn DefDatabase) -> InFile<ArenaMap<Self::ChildId, Self::Value>> { 116 fn child_source(&self, db: &dyn DefDatabase) -> InFile<ArenaMap<Self::ChildId, Self::Value>> {
117 let src = self.lookup(db).source(db); 117 let src = self.lookup(db).source(db);
118 let mut trace = Trace::new_for_map(); 118 let mut trace = Trace::new_for_map();
@@ -123,7 +123,7 @@ impl HasChildSource for EnumId {
123 123
124fn lower_enum( 124fn lower_enum(
125 db: &dyn DefDatabase, 125 db: &dyn DefDatabase,
126 trace: &mut Trace<EnumVariantData, ast::EnumVariant>, 126 trace: &mut Trace<EnumVariantData, ast::Variant>,
127 ast: &InFile<ast::Enum>, 127 ast: &InFile<ast::Enum>,
128 module_id: ModuleId, 128 module_id: ModuleId,
129) { 129) {
diff --git a/crates/ra_hir_def/src/child_by_source.rs b/crates/ra_hir_def/src/child_by_source.rs
index a885ec96d..dcb00a1d9 100644
--- a/crates/ra_hir_def/src/child_by_source.rs
+++ b/crates/ra_hir_def/src/child_by_source.rs
@@ -162,7 +162,7 @@ impl ChildBySource for EnumId {
162 let arena_map = arena_map.as_ref(); 162 let arena_map = arena_map.as_ref();
163 for (local_id, source) in arena_map.value.iter() { 163 for (local_id, source) in arena_map.value.iter() {
164 let id = EnumVariantId { parent: *self, local_id }; 164 let id = EnumVariantId { parent: *self, local_id };
165 res[keys::ENUM_VARIANT].insert(arena_map.with_value(source.clone()), id) 165 res[keys::VARIANT].insert(arena_map.with_value(source.clone()), id)
166 } 166 }
167 167
168 res 168 res
diff --git a/crates/ra_hir_def/src/item_tree/lower.rs b/crates/ra_hir_def/src/item_tree/lower.rs
index da7238416..6d963c852 100644
--- a/crates/ra_hir_def/src/item_tree/lower.rs
+++ b/crates/ra_hir_def/src/item_tree/lower.rs
@@ -259,7 +259,7 @@ impl Ctx {
259 Some(id(self.data().enums.alloc(res))) 259 Some(id(self.data().enums.alloc(res)))
260 } 260 }
261 261
262 fn lower_variants(&mut self, variants: &ast::EnumVariantList) -> IdRange<Variant> { 262 fn lower_variants(&mut self, variants: &ast::VariantList) -> IdRange<Variant> {
263 let start = self.next_variant_idx(); 263 let start = self.next_variant_idx();
264 for variant in variants.variants() { 264 for variant in variants.variants() {
265 if let Some(data) = self.lower_variant(&variant) { 265 if let Some(data) = self.lower_variant(&variant) {
@@ -271,7 +271,7 @@ impl Ctx {
271 IdRange::new(start..end) 271 IdRange::new(start..end)
272 } 272 }
273 273
274 fn lower_variant(&mut self, variant: &ast::EnumVariant) -> Option<Variant> { 274 fn lower_variant(&mut self, variant: &ast::Variant) -> Option<Variant> {
275 let name = variant.name()?.as_name(); 275 let name = variant.name()?.as_name();
276 let fields = self.lower_fields(&variant.kind()); 276 let fields = self.lower_fields(&variant.kind());
277 let res = Variant { name, fields }; 277 let res = Variant { name, fields };
diff --git a/crates/ra_hir_def/src/keys.rs b/crates/ra_hir_def/src/keys.rs
index 2695e8c24..c2a03dfed 100644
--- a/crates/ra_hir_def/src/keys.rs
+++ b/crates/ra_hir_def/src/keys.rs
@@ -24,7 +24,7 @@ pub const STRUCT: Key<ast::Struct, StructId> = Key::new();
24pub const UNION: Key<ast::Union, UnionId> = Key::new(); 24pub const UNION: Key<ast::Union, UnionId> = Key::new();
25pub const ENUM: Key<ast::Enum, EnumId> = Key::new(); 25pub const ENUM: Key<ast::Enum, EnumId> = Key::new();
26 26
27pub const ENUM_VARIANT: Key<ast::EnumVariant, EnumVariantId> = Key::new(); 27pub const VARIANT: Key<ast::Variant, EnumVariantId> = Key::new();
28pub const TUPLE_FIELD: Key<ast::TupleField, FieldId> = Key::new(); 28pub const TUPLE_FIELD: Key<ast::TupleField, FieldId> = Key::new();
29pub const RECORD_FIELD: Key<ast::RecordField, FieldId> = Key::new(); 29pub const RECORD_FIELD: Key<ast::RecordField, FieldId> = Key::new();
30pub const TYPE_PARAM: Key<ast::TypeParam, TypeParamId> = Key::new(); 30pub const TYPE_PARAM: Key<ast::TypeParam, TypeParamId> = Key::new();