Skip to content

Commit 1f9e686

Browse files
committed
undo
1 parent 6c5403e commit 1f9e686

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

crates/ide-completion/src/render/function.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,19 +104,17 @@ fn render(
104104
.filter(|_| !has_call_parens)
105105
.and_then(|cap| Some((cap, params(ctx.completion, func, &func_kind, has_dot_receiver)?)));
106106

107-
let type_match = if has_call_parens || complete_call_parens.is_some() {
108-
compute_type_match(completion, &ret_type)
109-
} else {
110-
compute_type_match(completion, &func.ty(db))
111-
};
112-
113107
let function =
114108
assoc_item.and_then(|assoc_item| assoc_item.implementing_ty(db)).and_then(|self_type| {
115109
compute_function_match(db, &ctx, self_type, func, has_self_param, &ret_type)
116110
});
117111

118112
item.set_relevance(CompletionRelevance {
119-
type_match,
113+
type_match: if has_call_parens || complete_call_parens.is_some() {
114+
compute_type_match(completion, &ret_type)
115+
} else {
116+
compute_type_match(completion, &func.ty(db))
117+
},
120118
exact_name_match: compute_exact_name_match(completion, &call),
121119
function,
122120
is_op_method,

0 commit comments

Comments
 (0)