aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_completion/src/render.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide_completion/src/render.rs')
-rw-r--r--crates/ide_completion/src/render.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/crates/ide_completion/src/render.rs b/crates/ide_completion/src/render.rs
index fae5685e2..0a6ac8804 100644
--- a/crates/ide_completion/src/render.rs
+++ b/crates/ide_completion/src/render.rs
@@ -246,7 +246,6 @@ impl<'a> Render<'a> {
246 } 246 }
247 }; 247 };
248 248
249 let mut ref_match = None;
250 if let ScopeDef::Local(local) = resolution { 249 if let ScopeDef::Local(local) = resolution {
251 if let Some((active_name, active_type)) = self.ctx.active_name_and_type() { 250 if let Some((active_name, active_type)) = self.ctx.active_name_and_type() {
252 let ty = local.ty(self.ctx.db()); 251 let ty = local.ty(self.ctx.db());
@@ -255,7 +254,11 @@ impl<'a> Render<'a> {
255 { 254 {
256 item = item.set_score(score); 255 item = item.set_score(score);
257 } 256 }
258 ref_match = refed_type_matches(&active_type, &active_name, &ty, &local_name); 257 if let Some(ref_match) =
258 refed_type_matches(&active_type, &active_name, &ty, &local_name)
259 {
260 item = item.ref_match(ref_match);
261 }
259 } 262 }
260 } 263 }
261 264
@@ -285,7 +288,6 @@ impl<'a> Render<'a> {
285 Some( 288 Some(
286 item.kind(kind) 289 item.kind(kind)
287 .add_import(import_to_add) 290 .add_import(import_to_add)
288 .set_ref_match(ref_match)
289 .set_documentation(self.docs(resolution)) 291 .set_documentation(self.docs(resolution))
290 .set_deprecated(self.is_deprecated(resolution)) 292 .set_deprecated(self.is_deprecated(resolution))
291 .build(), 293 .build(),