mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Clarify when we visit modules multiple times
This commit is contained in:
parent
2fb3d87bf7
commit
bc2d172995
1 changed files with 3 additions and 1 deletions
|
@ -78,7 +78,9 @@ impl ImportMap {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we've just added a path to a module, descend into it.
|
// If we've just added a path to a module, descend into it. We might traverse
|
||||||
|
// modules multiple times, but only if the new path to it is shorter than the
|
||||||
|
// first (else we `continue` above).
|
||||||
if let Some(ModuleDefId::ModuleId(mod_id)) = item.as_module_def_id() {
|
if let Some(ModuleDefId::ModuleId(mod_id)) = item.as_module_def_id() {
|
||||||
worklist.push((mod_id, mk_path()));
|
worklist.push((mod_id, mk_path()));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue