diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-05-21 18:51:53 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-05-21 18:51:53 +0100 |
commit | edbde25ca2f13ffacfd006ada7b38618d36d97c6 (patch) | |
tree | b1c5208c74ce56a36c8a9c454b9c479a3312ee94 /crates/ide_completion | |
parent | de403b10448e23f232804596538de92fc57203d6 (diff) | |
parent | ef558c97d09b0be8639c92f490e5ad380aa04288 (diff) |
Merge #8856
8856: Use Chalk for unification r=flodiebold a=flodiebold
- use Chalk's unification, get rid of our own `unify`
- rewrite coercion to not use unification internals and to be more analogous to rustc
- fix various coercion bugs
- rewrite handling of obligations, since the old hacky optimization where we noted when an inference variable changes wasn't possible anymore
- stop trying to deeply resolve types all the time during inference, instead only do it shallowly where necessary
Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/ide_completion')
-rw-r--r-- | crates/ide_completion/src/render.rs | 2 |
1 files changed, 1 insertions, 1 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 |