diff --git a/crates/hir_def/src/find_path.rs b/crates/hir_def/src/find_path.rs index 219ed4c0710..08ffa8e53d2 100644 --- a/crates/hir_def/src/find_path.rs +++ b/crates/hir_def/src/find_path.rs @@ -141,7 +141,12 @@ fn find_path_inner( }) .is_some(); return Some(ModPath::from_segments( - if name_already_occupied_in_type_ns { PathKind::Abs } else { PathKind::Plain }, + if name_already_occupied_in_type_ns { + cov_mark::hit!(ambiguous_crate_start); + PathKind::Abs + } else { + PathKind::Plain + }, vec![name], )); } diff --git a/crates/ide_assists/src/handlers/auto_import.rs b/crates/ide_assists/src/handlers/auto_import.rs index 3ecb3d38ea7..7112dd65a1a 100644 --- a/crates/ide_assists/src/handlers/auto_import.rs +++ b/crates/ide_assists/src/handlers/auto_import.rs @@ -980,6 +980,7 @@ fn bar() { #[test] fn uses_abs_path_with_extern_crate_clash() { + cov_mark::check!(ambiguous_crate_start); check_assist( auto_import, r#"