aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/completion
diff options
context:
space:
mode:
authoradamrk <[email protected]>2020-09-02 21:33:54 +0100
committeradamrk <[email protected]>2020-09-02 21:33:54 +0100
commite11cd8fe35fbb4fcaf7859f4cef2dbd94ff7d230 (patch)
tree151d1188da4ce2a5a41d730bcc64ffd42e5447aa /crates/ide/src/completion
parentd9bb86ad7dfd17543e6e1c9ef184337f828b1027 (diff)
Remove exposing unification
Diffstat (limited to 'crates/ide/src/completion')
-rw-r--r--crates/ide/src/completion/presentation.rs2
1 files changed, 1 insertions, 1 deletions
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 {
194 fn add_arg(arg: &str, ty: &Type, ctx: &CompletionContext) -> String { 194 fn add_arg(arg: &str, ty: &Type, ctx: &CompletionContext) -> String {
195 if let Some(derefed_ty) = ty.remove_ref() { 195 if let Some(derefed_ty) = ty.remove_ref() {
196 for (name, local) in ctx.locals.iter() { 196 for (name, local) in ctx.locals.iter() {
197 if name == arg && local.can_unify(derefed_ty.clone(), ctx.db) { 197 if name == arg && local.ty(ctx.db) == derefed_ty {
198 return (if ty.is_mutable_reference() { "&mut " } else { "&" }).to_string() 198 return (if ty.is_mutable_reference() { "&mut " } else { "&" }).to_string()
199 + &arg.to_string(); 199 + &arg.to_string();
200 } 200 }