aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/references
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-07-30 13:51:08 +0100
committerAleksey Kladov <[email protected]>2020-07-30 14:16:05 +0100
commit1142112c70b705f59b7d559d9d72cdc831865158 (patch)
tree1ca467302b268c800da8b26482e90effcea08229 /crates/ra_ide/src/references
parent3e1e6227ca525f8631e0bff2215fa3de1b4f4cc1 (diff)
Rename FnDef -> Fn
Diffstat (limited to 'crates/ra_ide/src/references')
-rw-r--r--crates/ra_ide/src/references/rename.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ide/src/references/rename.rs b/crates/ra_ide/src/references/rename.rs
index 8735ec53c..d8ffb8c84 100644
--- a/crates/ra_ide/src/references/rename.rs
+++ b/crates/ra_ide/src/references/rename.rs
@@ -149,7 +149,7 @@ fn rename_to_self(
149 let source_file = sema.parse(position.file_id); 149 let source_file = sema.parse(position.file_id);
150 let syn = source_file.syntax(); 150 let syn = source_file.syntax();
151 151
152 let fn_def = find_node_at_offset::<ast::FnDef>(syn, position.offset)?; 152 let fn_def = find_node_at_offset::<ast::Fn>(syn, position.offset)?;
153 let params = fn_def.param_list()?; 153 let params = fn_def.param_list()?;
154 if params.self_param().is_some() { 154 if params.self_param().is_some() {
155 return None; // method already has self param 155 return None; // method already has self param
@@ -221,7 +221,7 @@ fn rename_self_to_param(
221 let syn = source_file.syntax(); 221 let syn = source_file.syntax();
222 222
223 let text = sema.db.file_text(position.file_id); 223 let text = sema.db.file_text(position.file_id);
224 let fn_def = find_node_at_offset::<ast::FnDef>(syn, position.offset)?; 224 let fn_def = find_node_at_offset::<ast::Fn>(syn, position.offset)?;
225 let search_range = fn_def.syntax().text_range(); 225 let search_range = fn_def.syntax().text_range();
226 226
227 let mut edits: Vec<SourceFileEdit> = vec![]; 227 let mut edits: Vec<SourceFileEdit> = vec![];