diff options
Diffstat (limited to 'crates/ra_hir/src/adt.rs')
-rw-r--r-- | crates/ra_hir/src/adt.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/crates/ra_hir/src/adt.rs b/crates/ra_hir/src/adt.rs index 3e9cd3c63..4fa2062bd 100644 --- a/crates/ra_hir/src/adt.rs +++ b/crates/ra_hir/src/adt.rs | |||
@@ -3,13 +3,14 @@ | |||
3 | 3 | ||
4 | use std::sync::Arc; | 4 | use std::sync::Arc; |
5 | 5 | ||
6 | use hir_def::{type_ref::TypeRef, LocalEnumVariantId}; | ||
7 | use hir_expand::name::AsName; | ||
6 | use ra_arena::{impl_arena_id, Arena, RawId}; | 8 | use ra_arena::{impl_arena_id, Arena, RawId}; |
7 | use ra_syntax::ast::{self, NameOwner, StructKind, TypeAscriptionOwner}; | 9 | use ra_syntax::ast::{self, NameOwner, StructKind, TypeAscriptionOwner}; |
8 | 10 | ||
9 | use crate::{ | 11 | use crate::{ |
10 | db::{AstDatabase, DefDatabase, HirDatabase}, | 12 | db::{AstDatabase, DefDatabase, HirDatabase}, |
11 | type_ref::TypeRef, | 13 | Enum, EnumVariant, FieldSource, HasSource, Module, Name, Source, Struct, StructField, |
12 | AsName, Enum, EnumVariant, FieldSource, HasSource, Module, Name, Source, Struct, StructField, | ||
13 | }; | 14 | }; |
14 | 15 | ||
15 | impl Struct { | 16 | impl Struct { |
@@ -67,7 +68,7 @@ impl EnumVariant { | |||
67 | #[derive(Debug, Clone, PartialEq, Eq)] | 68 | #[derive(Debug, Clone, PartialEq, Eq)] |
68 | pub struct EnumData { | 69 | pub struct EnumData { |
69 | pub(crate) name: Option<Name>, | 70 | pub(crate) name: Option<Name>, |
70 | pub(crate) variants: Arena<EnumVariantId, EnumVariantData>, | 71 | pub(crate) variants: Arena<LocalEnumVariantId, EnumVariantData>, |
71 | } | 72 | } |
72 | 73 | ||
73 | impl EnumData { | 74 | impl EnumData { |
@@ -84,10 +85,6 @@ impl EnumData { | |||
84 | } | 85 | } |
85 | } | 86 | } |
86 | 87 | ||
87 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] | ||
88 | pub(crate) struct EnumVariantId(RawId); | ||
89 | impl_arena_id!(EnumVariantId); | ||
90 | |||
91 | #[derive(Debug, Clone, PartialEq, Eq)] | 88 | #[derive(Debug, Clone, PartialEq, Eq)] |
92 | pub(crate) struct EnumVariantData { | 89 | pub(crate) struct EnumVariantData { |
93 | pub(crate) name: Option<Name>, | 90 | pub(crate) name: Option<Name>, |