mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-12 05:08:52 +00:00
hir::Crate boilerplate
This commit is contained in:
parent
9b1356464a
commit
9c6c7ec2da
2 changed files with 21 additions and 2 deletions
15
crates/ra_hir/src/krate.rs
Normal file
15
crates/ra_hir/src/krate.rs
Normal file
|
@ -0,0 +1,15 @@
|
|||
use crate::FileId;
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
|
||||
pub struct CrateId(u32);
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Crate {
|
||||
root: FileId,
|
||||
}
|
||||
|
||||
impl Crate {
|
||||
pub fn dependencies(&self) -> Vec<CrateId> {
|
||||
Vec::new()
|
||||
}
|
||||
}
|
|
@ -18,12 +18,15 @@ pub mod db;
|
|||
#[cfg(test)]
|
||||
mod mock;
|
||||
mod query_definitions;
|
||||
mod function;
|
||||
mod module;
|
||||
mod path;
|
||||
mod arena;
|
||||
pub mod source_binder;
|
||||
|
||||
mod krate;
|
||||
mod module;
|
||||
mod function;
|
||||
|
||||
|
||||
use std::ops::Index;
|
||||
|
||||
use ra_syntax::{SyntaxNodeRef, SyntaxNode};
|
||||
|
@ -36,6 +39,7 @@ use crate::{
|
|||
|
||||
pub use self::{
|
||||
path::{Path, PathKind},
|
||||
krate::Crate,
|
||||
module::{Module, ModuleId, Problem, nameres::ItemMap},
|
||||
function::{Function, FnScopes},
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue