aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ids.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/ids.rs')
-rw-r--r--crates/ra_hir/src/ids.rs26
1 files changed, 0 insertions, 26 deletions
diff --git a/crates/ra_hir/src/ids.rs b/crates/ra_hir/src/ids.rs
deleted file mode 100644
index 67de8b243..000000000
--- a/crates/ra_hir/src/ids.rs
+++ /dev/null
@@ -1,26 +0,0 @@
1//! hir makes heavy use of ids: integer (u32) handlers to various things. You
2//! can think of id as a pointer (but without a lifetime) or a file descriptor
3//! (but for hir objects).
4//!
5//! This module defines a bunch of ids we are using. The most important ones are
6//! probably `HirFileId` and `DefId`.
7
8use ra_db::{impl_intern_key, salsa};
9
10/// This exists just for Chalk, because Chalk just has a single `StructId` where
11/// we have different kinds of ADTs, primitive types and special type
12/// constructors like tuples and function pointers.
13#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
14pub struct TypeCtorId(salsa::InternId);
15impl_intern_key!(TypeCtorId);
16
17/// This exists just for Chalk, because our ImplIds are only unique per module.
18#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
19pub struct GlobalImplId(salsa::InternId);
20impl_intern_key!(GlobalImplId);
21
22/// This exists just for Chalk, because it needs a unique ID for each associated
23/// type value in an impl (even synthetic ones).
24#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
25pub struct AssocTyValueId(salsa::InternId);
26impl_intern_key!(AssocTyValueId);