diff options
Diffstat (limited to 'crates/ide_completion/src')
-rw-r--r-- | crates/ide_completion/src/render.rs | 2 | ||||
-rw-r--r-- | crates/ide_completion/src/test_utils.rs | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/crates/ide_completion/src/render.rs b/crates/ide_completion/src/render.rs index 1a762d3dc..6b04ee164 100644 --- a/crates/ide_completion/src/render.rs +++ b/crates/ide_completion/src/render.rs | |||
@@ -323,7 +323,7 @@ fn compute_type_match( | |||
323 | 323 | ||
324 | if completion_ty == expected_type { | 324 | if completion_ty == expected_type { |
325 | Some(CompletionRelevanceTypeMatch::Exact) | 325 | Some(CompletionRelevanceTypeMatch::Exact) |
326 | } else if expected_type.could_unify_with(completion_ty) { | 326 | } else if expected_type.could_unify_with(ctx.db, completion_ty) { |
327 | Some(CompletionRelevanceTypeMatch::CouldUnify) | 327 | Some(CompletionRelevanceTypeMatch::CouldUnify) |
328 | } else { | 328 | } else { |
329 | None | 329 | None |
diff --git a/crates/ide_completion/src/test_utils.rs b/crates/ide_completion/src/test_utils.rs index 939fb2d47..37be575e5 100644 --- a/crates/ide_completion/src/test_utils.rs +++ b/crates/ide_completion/src/test_utils.rs | |||
@@ -3,7 +3,10 @@ | |||
3 | use hir::{PrefixKind, Semantics}; | 3 | use hir::{PrefixKind, Semantics}; |
4 | use ide_db::{ | 4 | use ide_db::{ |
5 | base_db::{fixture::ChangeFixture, FileLoader, FilePosition}, | 5 | base_db::{fixture::ChangeFixture, FileLoader, FilePosition}, |
6 | helpers::{insert_use::InsertUseConfig, merge_imports::MergeBehavior, SnippetCap}, | 6 | helpers::{ |
7 | insert_use::{ImportGranularity, InsertUseConfig}, | ||
8 | SnippetCap, | ||
9 | }, | ||
7 | RootDatabase, | 10 | RootDatabase, |
8 | }; | 11 | }; |
9 | use itertools::Itertools; | 12 | use itertools::Itertools; |
@@ -20,8 +23,9 @@ pub(crate) const TEST_CONFIG: CompletionConfig = CompletionConfig { | |||
20 | add_call_argument_snippets: true, | 23 | add_call_argument_snippets: true, |
21 | snippet_cap: SnippetCap::new(true), | 24 | snippet_cap: SnippetCap::new(true), |
22 | insert_use: InsertUseConfig { | 25 | insert_use: InsertUseConfig { |
23 | merge: Some(MergeBehavior::Crate), | 26 | granularity: ImportGranularity::Crate, |
24 | prefix_kind: PrefixKind::Plain, | 27 | prefix_kind: PrefixKind::Plain, |
28 | enforce_granularity: true, | ||
25 | group: true, | 29 | group: true, |
26 | }, | 30 | }, |
27 | }; | 31 | }; |