aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-10-30 09:27:54 +0000
committerAleksey Kladov <[email protected]>2019-10-30 09:27:54 +0000
commita136cc0653d2b4133fb6387009cfdbaf3e2cf275 (patch)
treec7693867220abfefd90acb9965d91c6fe0023d38 /crates/ra_hir_def
parent56bc874f1d14922686b26afc8793b7e57a652990 (diff)
introduce ra_hir_def
Diffstat (limited to 'crates/ra_hir_def')
-rw-r--r--crates/ra_hir_def/Cargo.toml13
-rw-r--r--crates/ra_hir_def/src/lib.rs14
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]
2edition = "2018"
3name = "ra_hir_def"
4version = "0.1.0"
5authors = ["rust-analyzer developers"]
6
7[dependencies]
8log = "0.4.5"
9
10ra_arena = { path = "../ra_arena" }
11ra_db = { path = "../ra_db" }
12ra_syntax = { path = "../ra_syntax" }
13ra_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 @@
1use ra_arena::{impl_arena_id, RawId};
2use ra_db::CrateId;
3
4#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
5pub 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)]
13pub struct CrateModuleId(RawId);
14impl_arena_id!(CrateModuleId);