rust-analyzer/crates/ra_hir_def/src/lib.rs

15 lines
415 B
Rust
Raw Normal View History

2019-10-30 09:27:54 +00:00
use ra_arena::{impl_arena_id, RawId};
use ra_db::CrateId;
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct ModuleId {
pub krate: CrateId,
pub module_id: CrateModuleId,
}
/// An ID of a module, **local** to a specific crate
// FIXME: rename to `LocalModuleId`.
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct CrateModuleId(RawId);
impl_arena_id!(CrateModuleId);