Skip to content

Commit 8a5b24e

Browse files
Explicitly connect an ambiguous import path case logic with the test on it
1 parent 2877707 commit 8a5b24e

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

crates/hir_def/src/find_path.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,12 @@ fn find_path_inner(
141141
})
142142
.is_some();
143143
return Some(ModPath::from_segments(
144-
if name_already_occupied_in_type_ns { PathKind::Abs } else { PathKind::Plain },
144+
if name_already_occupied_in_type_ns {
145+
cov_mark::hit!(ambiguous_crate_start);
146+
PathKind::Abs
147+
} else {
148+
PathKind::Plain
149+
},
145150
vec![name],
146151
));
147152
}

crates/ide_assists/src/handlers/auto_import.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -980,6 +980,7 @@ mod bar {
980980

981981
#[test]
982982
fn uses_abs_path_with_extern_crate_clash() {
983+
cov_mark::check!(ambiguous_crate_start);
983984
check_assist(
984985
auto_import,
985986
r#"

0 commit comments

Comments
 (0)