aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide')
-rw-r--r--crates/ra_ide/src/inlay_hints.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/ra_ide/src/inlay_hints.rs b/crates/ra_ide/src/inlay_hints.rs
index fb63fd1de..a484dfdeb 100644
--- a/crates/ra_ide/src/inlay_hints.rs
+++ b/crates/ra_ide/src/inlay_hints.rs
@@ -113,12 +113,13 @@ fn get_param_name_hints(
113 .collect::<Vec<_>>(); 113 .collect::<Vec<_>>();
114 114
115 let fn_signature = get_fn_signature(db, analyzer, &expr)?; 115 let fn_signature = get_fn_signature(db, analyzer, &expr)?;
116 let parameters = 116 let n_params_to_skip =
117 if fn_signature.has_self_param && fn_signature.parameter_names.len() > args.len() { 117 if fn_signature.has_self_param && fn_signature.parameter_names.len() > args.len() {
118 fn_signature.parameter_names.iter().skip(1) 118 1
119 } else { 119 } else {
120 fn_signature.parameter_names.iter().skip(0) 120 0
121 }; 121 };
122 let parameters = fn_signature.parameter_names.iter().skip(n_params_to_skip);
122 123
123 let hints = parameters 124 let hints = parameters
124 .zip(args) 125 .zip(args)