9611: minor: Explicitly connect an ambiguous import path case logic with its test r=SomeoneToIgnore a=SomeoneToIgnore

Follows up https://github.com/rust-analyzer/rust-analyzer/pull/8820/

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
This commit is contained in:
bors[bot] 2021-07-15 21:42:47 +00:00 committed by GitHub
commit ed83b243aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -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],
));
}

View File

@ -980,6 +980,7 @@ mod bar {
#[test]
fn uses_abs_path_with_extern_crate_clash() {
cov_mark::check!(ambiguous_crate_start);
check_assist(
auto_import,
r#"