Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-db/src/rename.rs')
-rw-r--r--crates/ide-db/src/rename.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ide-db/src/rename.rs b/crates/ide-db/src/rename.rs
index c653264006..7f28965885 100644
--- a/crates/ide-db/src/rename.rs
+++ b/crates/ide-db/src/rename.rs
@@ -516,7 +516,7 @@ fn source_edit_from_def(
if let Definition::Local(local) = def {
let mut file_id = None;
for source in local.sources(sema.db) {
- let source = match source.source.clone().original_ast_node(sema.db) {
+ let source = match source.source.clone().original_ast_node_rooted(sema.db) {
Some(source) => source,
None => match source
.source
@@ -560,7 +560,7 @@ fn source_edit_from_def(
}
} else {
// Foo { ref mut field } -> Foo { field: ref mut new_name }
- // ^ insert `field: `
+ // original_ast_node_rootedd: `
// ^^^^^ replace this with `new_name`
edit.insert(
pat.syntax().text_range().start(),