Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/rename.rs')
-rw-r--r--crates/ide/src/rename.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ide/src/rename.rs b/crates/ide/src/rename.rs
index ae19e77509..900a885a64 100644
--- a/crates/ide/src/rename.rs
+++ b/crates/ide/src/rename.rs
@@ -480,7 +480,7 @@ fn rename_to_self(
}
let fn_def = match local.parent(sema.db) {
- hir::DefWithBody::Function(func) => func,
+ hir::ExpressionStoreOwner::Body(hir::DefWithBody::Function(func)) => func,
_ => bail!("Cannot rename local to self outside of function"),
};
@@ -743,7 +743,7 @@ fn rename_self_to_param(
}
let fn_def = match local.parent(sema.db) {
- hir::DefWithBody::Function(func) => func,
+ hir::ExpressionStoreOwner::Body(hir::DefWithBody::Function(func)) => func,
_ => bail!("Cannot rename local to self outside of function"),
};