aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-12-01 11:29:25 +0000
committerGitHub <[email protected]>2020-12-01 11:29:25 +0000
commit75e037fcf75691a3a87d0cb37ea660dd7105ffba (patch)
tree0a08b79f8fb8f5da53e5d700d827d325cd326178 /crates/ide/src
parent455a0cfda2121596deb13ca3f40a83c98b32863c (diff)
parent9d94ffad44f2b250e498f162cd498aed62877c8e (diff)
Merge #6688
6688: Place cursor correctly when completing assoc fns with self r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ide/src')
-rw-r--r--crates/ide/src/references/rename.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ide/src/references/rename.rs b/crates/ide/src/references/rename.rs
index 731457696..64fe8bd65 100644
--- a/crates/ide/src/references/rename.rs
+++ b/crates/ide/src/references/rename.rs
@@ -241,7 +241,7 @@ fn rename_to_self(
241 return Err(RenameError("Method already has a self parameter".to_string())); 241 return Err(RenameError("Method already has a self parameter".to_string()));
242 } 242 }
243 243
244 let params = fn_def.params(sema.db); 244 let params = fn_def.assoc_fn_params(sema.db);
245 let first_param = 245 let first_param =
246 params.first().ok_or_else(|| RenameError("Method has no parameters".into()))?; 246 params.first().ok_or_else(|| RenameError("Method has no parameters".into()))?;
247 let first_param_ty = first_param.ty(); 247 let first_param_ty = first_param.ty();