aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/adt.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/adt.rs')
-rw-r--r--crates/ra_hir/src/adt.rs11
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
4use std::sync::Arc; 4use std::sync::Arc;
5 5
6use hir_def::{type_ref::TypeRef, LocalEnumVariantId};
7use hir_expand::name::AsName;
6use ra_arena::{impl_arena_id, Arena, RawId}; 8use ra_arena::{impl_arena_id, Arena, RawId};
7use ra_syntax::ast::{self, NameOwner, StructKind, TypeAscriptionOwner}; 9use ra_syntax::ast::{self, NameOwner, StructKind, TypeAscriptionOwner};
8 10
9use crate::{ 11use 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
15impl Struct { 16impl Struct {
@@ -67,7 +68,7 @@ impl EnumVariant {
67#[derive(Debug, Clone, PartialEq, Eq)] 68#[derive(Debug, Clone, PartialEq, Eq)]
68pub struct EnumData { 69pub 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
73impl EnumData { 74impl EnumData {
@@ -84,10 +85,6 @@ impl EnumData {
84 } 85 }
85} 86}
86 87
87#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
88pub(crate) struct EnumVariantId(RawId);
89impl_arena_id!(EnumVariantId);
90
91#[derive(Debug, Clone, PartialEq, Eq)] 88#[derive(Debug, Clone, PartialEq, Eq)]
92pub(crate) struct EnumVariantData { 89pub(crate) struct EnumVariantData {
93 pub(crate) name: Option<Name>, 90 pub(crate) name: Option<Name>,