aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_def')
-rw-r--r--crates/ra_hir_def/src/lib.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/crates/ra_hir_def/src/lib.rs b/crates/ra_hir_def/src/lib.rs
index 5bc9ffc0d..8e8c2d749 100644
--- a/crates/ra_hir_def/src/lib.rs
+++ b/crates/ra_hir_def/src/lib.rs
@@ -192,12 +192,6 @@ pub struct LocalEnumVariantId(RawId);
192impl_arena_id!(LocalEnumVariantId); 192impl_arena_id!(LocalEnumVariantId);
193 193
194#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] 194#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
195pub enum VariantId {
196 EnumVariantId(EnumVariantId),
197 StructId(StructId),
198}
199
200#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
201pub struct StructFieldId { 195pub struct StructFieldId {
202 pub parent: VariantId, 196 pub parent: VariantId,
203 pub local_id: LocalStructFieldId, 197 pub local_id: LocalStructFieldId,
@@ -437,6 +431,13 @@ impl_froms!(
437 ImplId 431 ImplId
438); 432);
439 433
434#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
435pub enum VariantId {
436 EnumVariantId(EnumVariantId),
437 StructId(StructId),
438}
439impl_froms!(VariantId: EnumVariantId, StructId);
440
440trait Intern { 441trait Intern {
441 type ID; 442 type ID;
442 fn intern(self, db: &impl db::DefDatabase) -> Self::ID; 443 fn intern(self, db: &impl db::DefDatabase) -> Self::ID;