From 6f51f728a114078a0c3a029fc66cfb8c4daf9a28 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 1 Dec 2020 13:53:12 +0300 Subject: Type-safer API for dealing with parameter lists with optional self --- crates/ide/src/references/rename.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ide/src') 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( return Err(RenameError("Method already has a self parameter".to_string())); } - let params = fn_def.params(sema.db); + let params = fn_def.assoc_fn_params(sema.db); let first_param = params.first().ok_or_else(|| RenameError("Method has no parameters".into()))?; let first_param_ty = first_param.ty(); -- cgit v1.2.3