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