introduce ids module
This commit is contained in:
@@ -22,6 +22,7 @@ mod path;
|
||||
mod arena;
|
||||
pub mod source_binder;
|
||||
|
||||
mod ids;
|
||||
mod macros;
|
||||
mod name;
|
||||
mod krate;
|
||||
@@ -46,6 +47,7 @@ pub use self::{
|
||||
path::{Path, PathKind},
|
||||
name::Name,
|
||||
krate::Crate,
|
||||
ids::MFileId,
|
||||
macros::{MacroDef, MacroInput, MacroExpansion, MacroCallId, MacroCallLoc},
|
||||
module::{Module, ModuleId, Problem, nameres::{ItemMap, PerNs, Namespace}, ModuleScope, Resolution},
|
||||
function::{Function, FnScopes},
|
||||
@@ -55,20 +57,6 @@ pub use self::{
|
||||
|
||||
pub use self::function::FnSignatureInfo;
|
||||
|
||||
/// An `MFileId` is like a `FileId`, but it can also refer to code generated by
|
||||
/// macros.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub enum MFileId {
|
||||
File(FileId),
|
||||
Macro(MacroCallId),
|
||||
}
|
||||
|
||||
impl From<FileId> for MFileId {
|
||||
fn from(file_id: FileId) -> MFileId {
|
||||
MFileId::File(file_id)
|
||||
}
|
||||
}
|
||||
|
||||
/// Def's are a core concept of hir. A `Def` is an Item (function, module, etc)
|
||||
/// in a specific module.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
|
||||
Reference in New Issue
Block a user