Skip to content

Commit f98d057

Browse files
bors[bot]matklad
andauthored
Merge #4755
4755: Inlay Hints: more directly account for self param r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
2 parents 913a623 + 522d24a commit f98d057

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

crates/ra_ide/src/inlay_hints.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,10 @@ fn get_param_name_hints(
149149
ast::Expr::MethodCallExpr(expr) => expr.arg_list()?.args(),
150150
_ => return None,
151151
};
152-
let args_count = args.clone().count();
153152

154153
let fn_signature = get_fn_signature(sema, &expr)?;
155154
let n_params_to_skip =
156-
if fn_signature.has_self_param && fn_signature.parameter_names.len() > args_count {
155+
if fn_signature.has_self_param && matches!(&expr, ast::Expr::MethodCallExpr(_)) {
157156
1
158157
} else {
159158
0

0 commit comments

Comments
 (0)