aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/references
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-12-01 10:53:12 +0000
committerAleksey Kladov <[email protected]>2020-12-01 10:53:39 +0000
commit6f51f728a114078a0c3a029fc66cfb8c4daf9a28 (patch)
tree21a6ec1454180e7cec86a3a2efae000d70a07096 /crates/ide/src/references
parent455a0cfda2121596deb13ca3f40a83c98b32863c (diff)
Type-safer API for dealing with parameter lists with optional self
Diffstat (limited to 'crates/ide/src/references')
-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();