Explicitly connect an ambiguous import path case logic with the test on it

This commit is contained in:
Kirill Bulatov 2021-07-16 00:41:00 +03:00
parent 2877707677
commit 8a5b24eb7e
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 @@ fn bar() {
#[test]
fn uses_abs_path_with_extern_crate_clash() {
cov_mark::check!(ambiguous_crate_start);
check_assist(
auto_import,
r#"