Skip to content

Commit bc2d172

Browse files
author
Jonas Schievink
committed
Clarify when we visit modules multiple times
1 parent 2fb3d87 commit bc2d172

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crates/ra_hir_def/src/import_map.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ impl ImportMap {
7878
}
7979
}
8080

81-
// If we've just added a path to a module, descend into it.
81+
// If we've just added a path to a module, descend into it. We might traverse
82+
// modules multiple times, but only if the new path to it is shorter than the
83+
// first (else we `continue` above).
8284
if let Some(ModuleDefId::ModuleId(mod_id)) = item.as_module_def_id() {
8385
worklist.push((mod_id, mk_path()));
8486
}

0 commit comments

Comments
 (0)