mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Merge #9611
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:
commit
ed83b243aa
2 changed files with 7 additions and 1 deletions
|
@ -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],
|
||||
));
|
||||
}
|
||||
|
|
|
@ -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#"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue