diff options
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r-- | crates/ra_hir/src/adt.rs | 8 | ||||
-rw-r--r-- | crates/ra_hir/src/code_model.rs | 6 |
2 files changed, 5 insertions, 9 deletions
diff --git a/crates/ra_hir/src/adt.rs b/crates/ra_hir/src/adt.rs index 97424b39e..4fa2062bd 100644 --- a/crates/ra_hir/src/adt.rs +++ b/crates/ra_hir/src/adt.rs | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | use std::sync::Arc; | 4 | use std::sync::Arc; |
5 | 5 | ||
6 | use hir_def::type_ref::TypeRef; | 6 | use hir_def::{type_ref::TypeRef, LocalEnumVariantId}; |
7 | use hir_expand::name::AsName; | 7 | use hir_expand::name::AsName; |
8 | use ra_arena::{impl_arena_id, Arena, RawId}; | 8 | use ra_arena::{impl_arena_id, Arena, RawId}; |
9 | use ra_syntax::ast::{self, NameOwner, StructKind, TypeAscriptionOwner}; | 9 | use ra_syntax::ast::{self, NameOwner, StructKind, TypeAscriptionOwner}; |
@@ -68,7 +68,7 @@ impl EnumVariant { | |||
68 | #[derive(Debug, Clone, PartialEq, Eq)] | 68 | #[derive(Debug, Clone, PartialEq, Eq)] |
69 | pub struct EnumData { | 69 | pub struct EnumData { |
70 | pub(crate) name: Option<Name>, | 70 | pub(crate) name: Option<Name>, |
71 | pub(crate) variants: Arena<EnumVariantId, EnumVariantData>, | 71 | pub(crate) variants: Arena<LocalEnumVariantId, EnumVariantData>, |
72 | } | 72 | } |
73 | 73 | ||
74 | impl EnumData { | 74 | impl EnumData { |
@@ -85,10 +85,6 @@ impl EnumData { | |||
85 | } | 85 | } |
86 | } | 86 | } |
87 | 87 | ||
88 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] | ||
89 | pub(crate) struct EnumVariantId(RawId); | ||
90 | impl_arena_id!(EnumVariantId); | ||
91 | |||
92 | #[derive(Debug, Clone, PartialEq, Eq)] | 88 | #[derive(Debug, Clone, PartialEq, Eq)] |
93 | pub(crate) struct EnumVariantData { | 89 | pub(crate) struct EnumVariantData { |
94 | pub(crate) name: Option<Name>, | 90 | pub(crate) name: Option<Name>, |
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index e0c6d6340..b32aa145e 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs | |||
@@ -8,14 +8,14 @@ use std::sync::Arc; | |||
8 | use hir_def::{ | 8 | use hir_def::{ |
9 | builtin_type::BuiltinType, | 9 | builtin_type::BuiltinType, |
10 | type_ref::{Mutability, TypeRef}, | 10 | type_ref::{Mutability, TypeRef}, |
11 | CrateModuleId, ModuleId, | 11 | CrateModuleId, LocalEnumVariantId, ModuleId, |
12 | }; | 12 | }; |
13 | use hir_expand::name::{self, AsName}; | 13 | use hir_expand::name::{self, AsName}; |
14 | use ra_db::{CrateId, Edition}; | 14 | use ra_db::{CrateId, Edition}; |
15 | use ra_syntax::ast::{self, NameOwner, TypeAscriptionOwner}; | 15 | use ra_syntax::ast::{self, NameOwner, TypeAscriptionOwner}; |
16 | 16 | ||
17 | use crate::{ | 17 | use crate::{ |
18 | adt::{EnumVariantId, StructFieldId, VariantDef}, | 18 | adt::{StructFieldId, VariantDef}, |
19 | db::{AstDatabase, DefDatabase, HirDatabase}, | 19 | db::{AstDatabase, DefDatabase, HirDatabase}, |
20 | diagnostics::DiagnosticSink, | 20 | diagnostics::DiagnosticSink, |
21 | expr::{validation::ExprValidator, Body, BodySourceMap}, | 21 | expr::{validation::ExprValidator, Body, BodySourceMap}, |
@@ -410,7 +410,7 @@ impl Enum { | |||
410 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] | 410 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] |
411 | pub struct EnumVariant { | 411 | pub struct EnumVariant { |
412 | pub(crate) parent: Enum, | 412 | pub(crate) parent: Enum, |
413 | pub(crate) id: EnumVariantId, | 413 | pub(crate) id: LocalEnumVariantId, |
414 | } | 414 | } |
415 | 415 | ||
416 | impl EnumVariant { | 416 | impl EnumVariant { |