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