mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Use Crate instead of CrateId
This commit is contained in:
parent
95aa7e46fc
commit
ef7eb8c257
9 changed files with 36 additions and 45 deletions
|
@ -52,7 +52,7 @@ pub enum Def {
|
|||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub struct Module {
|
||||
pub(crate) krate: CrateId,
|
||||
pub(crate) krate: Crate,
|
||||
pub(crate) module_id: ModuleId,
|
||||
}
|
||||
|
||||
|
@ -133,8 +133,8 @@ impl Module {
|
|||
}
|
||||
|
||||
/// Returns the crate this module is part of.
|
||||
pub fn krate(&self, db: &impl HirDatabase) -> Option<Crate> {
|
||||
self.krate_impl(db)
|
||||
pub fn krate(&self, _db: &impl HirDatabase) -> Option<Crate> {
|
||||
Some(self.krate)
|
||||
}
|
||||
|
||||
/// Topmost parent of this module. Every module has a `crate_root`, but some
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue