Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-assists/src/handlers/generate_documentation_template.rs')
-rw-r--r--crates/ide-assists/src/handlers/generate_documentation_template.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ide-assists/src/handlers/generate_documentation_template.rs b/crates/ide-assists/src/handlers/generate_documentation_template.rs
index f298ce8916..38b24fd19c 100644
--- a/crates/ide-assists/src/handlers/generate_documentation_template.rs
+++ b/crates/ide-assists/src/handlers/generate_documentation_template.rs
@@ -364,7 +364,7 @@ fn is_in_trait_impl(ast_func: &ast::Fn, ctx: &AssistContext<'_>) -> bool {
ctx.sema
.to_def(ast_func)
.and_then(|hir_func| hir_func.as_assoc_item(ctx.db()))
- .and_then(|assoc_item| assoc_item.containing_trait_impl(ctx.db()))
+ .and_then(|assoc_item| assoc_item.implemented_trait(ctx.db()))
.is_some()
}
@@ -373,7 +373,7 @@ fn is_in_trait_def(ast_func: &ast::Fn, ctx: &AssistContext<'_>) -> bool {
ctx.sema
.to_def(ast_func)
.and_then(|hir_func| hir_func.as_assoc_item(ctx.db()))
- .and_then(|assoc_item| assoc_item.containing_trait(ctx.db()))
+ .and_then(|assoc_item| assoc_item.container_trait(ctx.db()))
.is_some()
}
@@ -416,9 +416,9 @@ fn arguments_from_params(param_list: &ast::ParamList) -> String {
true => format!("&mut {name}"),
false => name.to_string(),
},
- None => "_".to_string(),
+ None => "_".to_owned(),
},
- _ => "_".to_string(),
+ _ => "_".to_owned(),
});
args_iter.format(", ").to_string()
}