mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
Create all ModuleId
s through a DefMap
method
`ModuleId` needs to be able to represent blocks, and only the associated `DefMap` will know how to construct that `ModuleId`
This commit is contained in:
parent
82af033f2f
commit
5c241b0766
11 changed files with 48 additions and 87 deletions
|
@ -75,7 +75,7 @@ impl ImportMap {
|
|||
|
||||
// We look only into modules that are public(ly reexported), starting with the crate root.
|
||||
let empty = ImportPath { segments: vec![] };
|
||||
let root = ModuleId { krate, local_id: def_map.root() };
|
||||
let root = def_map.module_id(def_map.root());
|
||||
let mut worklist = vec![(root, empty)];
|
||||
while let Some((module, mod_path)) = worklist.pop() {
|
||||
let ext_def_map;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue