fix: Fix import_map::search_dependencies getting confused by assoc and non assoc items with the same name

This commit is contained in:
Lukas Wirth 2023-12-12 15:44:27 +01:00
parent 3aa6306728
commit ca995d765d
3 changed files with 66 additions and 36 deletions

View file

@ -36,7 +36,8 @@ pub fn items_with_name<'a>(
NameToImport::Prefix(exact_name, case_sensitive)
| NameToImport::Exact(exact_name, case_sensitive) => {
let mut local_query = symbol_index::Query::new(exact_name.clone());
let mut external_query = import_map::Query::new(exact_name);
let mut external_query =
import_map::Query::new(exact_name).assoc_search_mode(assoc_item_search);
if prefix {
local_query.prefix();
external_query = external_query.prefix();