From e11cd8fe35fbb4fcaf7859f4cef2dbd94ff7d230 Mon Sep 17 00:00:00 2001 From: adamrk Date: Wed, 2 Sep 2020 22:33:54 +0200 Subject: Remove exposing unification --- crates/ide/src/completion/presentation.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ide/src/completion') diff --git a/crates/ide/src/completion/presentation.rs b/crates/ide/src/completion/presentation.rs index 059fdfdc9..c7d460465 100644 --- a/crates/ide/src/completion/presentation.rs +++ b/crates/ide/src/completion/presentation.rs @@ -194,7 +194,7 @@ impl Completions { fn add_arg(arg: &str, ty: &Type, ctx: &CompletionContext) -> String { if let Some(derefed_ty) = ty.remove_ref() { for (name, local) in ctx.locals.iter() { - if name == arg && local.can_unify(derefed_ty.clone(), ctx.db) { + if name == arg && local.ty(ctx.db) == derefed_ty { return (if ty.is_mutable_reference() { "&mut " } else { "&" }).to_string() + &arg.to_string(); } -- cgit v1.2.3