Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-assists/src/handlers/move_const_to_impl.rs')
-rw-r--r--crates/ide-assists/src/handlers/move_const_to_impl.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/ide-assists/src/handlers/move_const_to_impl.rs b/crates/ide-assists/src/handlers/move_const_to_impl.rs
index b6027eac55..e1849eb71d 100644
--- a/crates/ide-assists/src/handlers/move_const_to_impl.rs
+++ b/crates/ide-assists/src/handlers/move_const_to_impl.rs
@@ -54,7 +54,11 @@ pub(crate) fn move_const_to_impl(acc: &mut Assists, ctx: &AssistContext<'_>) ->
// NOTE: We can technically provide this assist for default methods in trait definitions, but
// it's somewhat complex to handle it correctly when the const's name conflicts with
// supertrait's item. We may want to consider implementing it in the future.
- let AssocItemContainer::Impl(impl_) = ctx.sema.to_def(&parent_fn)?.as_assoc_item(db)?.container(db) else { return None; };
+ let AssocItemContainer::Impl(impl_) =
+ ctx.sema.to_def(&parent_fn)?.as_assoc_item(db)?.container(db)
+ else {
+ return None;
+ };
if impl_.trait_(db).is_some() {
return None;
}