From 129353255cf7cf103dc593407f3aac1f606827b0 Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Mon, 22 Mar 2021 15:15:53 +0200 Subject: Code review fixes --- crates/hir_def/src/find_path.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/hir_def/src/find_path.rs b/crates/hir_def/src/find_path.rs index b4362a5c4..109d3552f 100644 --- a/crates/hir_def/src/find_path.rs +++ b/crates/hir_def/src/find_path.rs @@ -181,6 +181,7 @@ fn find_path_inner( // dependency in this case. for (module_id, name) in find_local_import_locations(db, item, from) { if !visited_modules.insert(module_id) { + cov_mark::hit!(recursive_imports); continue; } if let Some(mut path) = find_path_inner( @@ -894,6 +895,7 @@ mod tests { #[test] fn recursive_pub_mod_reexport() { + cov_mark::check!(recursive_imports); check_found_path( r#" fn main() { -- cgit v1.2.3