diff options
author | Aleksey Kladov <[email protected]> | 2019-10-30 09:27:54 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-10-30 09:27:54 +0000 |
commit | a136cc0653d2b4133fb6387009cfdbaf3e2cf275 (patch) | |
tree | c7693867220abfefd90acb9965d91c6fe0023d38 /crates/ra_hir_def | |
parent | 56bc874f1d14922686b26afc8793b7e57a652990 (diff) |
introduce ra_hir_def
Diffstat (limited to 'crates/ra_hir_def')
-rw-r--r-- | crates/ra_hir_def/Cargo.toml | 13 | ||||
-rw-r--r-- | crates/ra_hir_def/src/lib.rs | 14 |
2 files changed, 27 insertions, 0 deletions
diff --git a/crates/ra_hir_def/Cargo.toml b/crates/ra_hir_def/Cargo.toml new file mode 100644 index 000000000..f22a678eb --- /dev/null +++ b/crates/ra_hir_def/Cargo.toml | |||
@@ -0,0 +1,13 @@ | |||
1 | [package] | ||
2 | edition = "2018" | ||
3 | name = "ra_hir_def" | ||
4 | version = "0.1.0" | ||
5 | authors = ["rust-analyzer developers"] | ||
6 | |||
7 | [dependencies] | ||
8 | log = "0.4.5" | ||
9 | |||
10 | ra_arena = { path = "../ra_arena" } | ||
11 | ra_db = { path = "../ra_db" } | ||
12 | ra_syntax = { path = "../ra_syntax" } | ||
13 | ra_prof = { path = "../ra_prof" } | ||
diff --git a/crates/ra_hir_def/src/lib.rs b/crates/ra_hir_def/src/lib.rs new file mode 100644 index 000000000..f5dd2ae6f --- /dev/null +++ b/crates/ra_hir_def/src/lib.rs | |||
@@ -0,0 +1,14 @@ | |||
1 | use ra_arena::{impl_arena_id, RawId}; | ||
2 | use ra_db::CrateId; | ||
3 | |||
4 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] | ||
5 | pub struct ModuleId { | ||
6 | pub krate: CrateId, | ||
7 | pub module_id: CrateModuleId, | ||
8 | } | ||
9 | |||
10 | /// An ID of a module, **local** to a specific crate | ||
11 | // FIXME: rename to `LocalModuleId`. | ||
12 | #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] | ||
13 | pub struct CrateModuleId(RawId); | ||
14 | impl_arena_id!(CrateModuleId); | ||