diff options
Diffstat (limited to 'crates/ide')
-rw-r--r-- | crates/ide/src/completion/presentation.rs | 2 |
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 | } |