Code review fixes

This commit is contained in:
Kirill Bulatov 2021-03-22 15:15:53 +02:00
parent 3a4e99115d
commit 129353255c

View file

@ -181,6 +181,7 @@ fn find_path_inner(
// dependency in this case. // dependency in this case.
for (module_id, name) in find_local_import_locations(db, item, from) { for (module_id, name) in find_local_import_locations(db, item, from) {
if !visited_modules.insert(module_id) { if !visited_modules.insert(module_id) {
cov_mark::hit!(recursive_imports);
continue; continue;
} }
if let Some(mut path) = find_path_inner( if let Some(mut path) = find_path_inner(
@ -894,6 +895,7 @@ mod tests {
#[test] #[test]
fn recursive_pub_mod_reexport() { fn recursive_pub_mod_reexport() {
cov_mark::check!(recursive_imports);
check_found_path( check_found_path(
r#" r#"
fn main() { fn main() {