mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Cleanup nameres
This commit is contained in:
parent
855a629b14
commit
f5e0a31eaf
5 changed files with 19 additions and 35 deletions
|
@ -62,7 +62,7 @@ impl Crate {
|
|||
}
|
||||
|
||||
pub fn root_module(self, db: &impl DefDatabase) -> Option<Module> {
|
||||
let module_id = db.crate_def_map(self.crate_id).root();
|
||||
let module_id = db.crate_def_map(self.crate_id).root;
|
||||
Some(Module::new(self, module_id))
|
||||
}
|
||||
|
||||
|
@ -195,7 +195,7 @@ impl Module {
|
|||
/// in the module tree of any target in `Cargo.toml`.
|
||||
pub fn crate_root(self, db: &impl DefDatabase) -> Module {
|
||||
let def_map = db.crate_def_map(self.id.krate);
|
||||
self.with_module_id(def_map.root())
|
||||
self.with_module_id(def_map.root)
|
||||
}
|
||||
|
||||
/// Finds a child module with the specified name.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue