aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_def/src/lib.rs')
-rw-r--r--crates/ra_hir_def/src/lib.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/crates/ra_hir_def/src/lib.rs b/crates/ra_hir_def/src/lib.rs
index 93ad40005..76d5f1852 100644
--- a/crates/ra_hir_def/src/lib.rs
+++ b/crates/ra_hir_def/src/lib.rs
@@ -12,6 +12,7 @@ pub mod attr;
12pub mod path; 12pub mod path;
13pub mod type_ref; 13pub mod type_ref;
14pub mod builtin_type; 14pub mod builtin_type;
15pub mod adt;
15 16
16// FIXME: this should be private 17// FIXME: this should be private
17pub mod nameres; 18pub mod nameres;
@@ -260,6 +261,22 @@ pub struct LocalEnumVariantId(RawId);
260impl_arena_id!(LocalEnumVariantId); 261impl_arena_id!(LocalEnumVariantId);
261 262
262#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] 263#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
264pub enum VariantId {
265 EnumVariantId(EnumVariantId),
266 StructId(StructId),
267}
268
269#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
270pub struct StructFieldId {
271 parent: VariantId,
272 local_id: LocalStructFieldId,
273}
274
275#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
276pub struct LocalStructFieldId(RawId);
277impl_arena_id!(LocalStructFieldId);
278
279#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
263pub struct ConstId(salsa::InternId); 280pub struct ConstId(salsa::InternId);
264impl_intern_key!(ConstId); 281impl_intern_key!(ConstId);
265impl AstItemDef<ast::ConstDef> for ConstId { 282impl AstItemDef<ast::ConstDef> for ConstId {