mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +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
|
@ -3,7 +3,7 @@ use ra_syntax::{ast, SyntaxNode, TreeArc};
|
|||
|
||||
use crate::{
|
||||
Module, ModuleSource, Problem,
|
||||
Crate, Name,
|
||||
Name,
|
||||
module_tree::ModuleId,
|
||||
impl_block::ImplId,
|
||||
nameres::{lower::ImportId},
|
||||
|
@ -67,10 +67,6 @@ impl Module {
|
|||
source_map.get(&source, impl_id)
|
||||
}
|
||||
|
||||
pub(crate) fn krate_impl(&self, _db: &impl HirDatabase) -> Option<Crate> {
|
||||
Some(Crate::new(self.krate))
|
||||
}
|
||||
|
||||
pub(crate) fn crate_root_impl(&self, db: &impl HirDatabase) -> Module {
|
||||
let module_tree = db.module_tree(self.krate);
|
||||
let module_id = self.module_id.crate_root(&module_tree);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue