aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_db/src/helpers
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-03-21 09:51:06 +0000
committerGitHub <[email protected]>2021-03-21 09:51:06 +0000
commit0d40ff5e623b3670ce3e0e324ecbab3e5197aaeb (patch)
treeb376f04aa3bd91eb13007e1a334327a45e45753c /crates/ide_db/src/helpers
parent09412d85fc3137d6ada3b27170e14c287f1a1191 (diff)
parentb17d99c0706674c7549aca4670f915aa0b0e2f4e (diff)
Merge #8131
8131: Do smart case fuzzy search during flyimports r=SomeoneToIgnore a=SomeoneToIgnore For now, last actionable part of https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/autoimport.20weirdness Should help https://github.com/rust-analyzer/rust-analyzer/issues/7902 Now during the flyimport completion, if the input is searched case-sensitively, if the input contains any non-lowercase letters; otherwise the lookup done as before, case-insensitively. Co-authored-by: Kirill Bulatov <[email protected]>
Diffstat (limited to 'crates/ide_db/src/helpers')
-rw-r--r--crates/ide_db/src/helpers/import_assets.rs3
1 files changed, 0 insertions, 3 deletions
diff --git a/crates/ide_db/src/helpers/import_assets.rs b/crates/ide_db/src/helpers/import_assets.rs
index 0da7a1a9d..1881c746f 100644
--- a/crates/ide_db/src/helpers/import_assets.rs
+++ b/crates/ide_db/src/helpers/import_assets.rs
@@ -267,7 +267,6 @@ fn path_applicable_imports(
267 AssocItemSearch::Exclude, 267 AssocItemSearch::Exclude,
268 Some(DEFAULT_QUERY_SEARCH_LIMIT), 268 Some(DEFAULT_QUERY_SEARCH_LIMIT),
269 ) 269 )
270 .into_iter()
271 .filter_map(|item| { 270 .filter_map(|item| {
272 let mod_path = mod_path(item)?; 271 let mod_path = mod_path(item)?;
273 Some(LocatedImport::new(mod_path.clone(), item, item, Some(mod_path))) 272 Some(LocatedImport::new(mod_path.clone(), item, item, Some(mod_path)))
@@ -285,7 +284,6 @@ fn path_applicable_imports(
285 AssocItemSearch::Include, 284 AssocItemSearch::Include,
286 Some(DEFAULT_QUERY_SEARCH_LIMIT), 285 Some(DEFAULT_QUERY_SEARCH_LIMIT),
287 ) 286 )
288 .into_iter()
289 .filter_map(|item| { 287 .filter_map(|item| {
290 import_for_item( 288 import_for_item(
291 sema.db, 289 sema.db,
@@ -430,7 +428,6 @@ fn trait_applicable_items(
430 AssocItemSearch::AssocItemsOnly, 428 AssocItemSearch::AssocItemsOnly,
431 Some(DEFAULT_QUERY_SEARCH_LIMIT), 429 Some(DEFAULT_QUERY_SEARCH_LIMIT),
432 ) 430 )
433 .into_iter()
434 .filter_map(|input| item_as_assoc(db, input)) 431 .filter_map(|input| item_as_assoc(db, input))
435 .filter_map(|assoc| { 432 .filter_map(|assoc| {
436 let assoc_item_trait = assoc.containing_trait(db)?; 433 let assoc_item_trait = assoc.containing_trait(db)?;