Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-completion/src/render/function.rs')
-rw-r--r--crates/ide-completion/src/render/function.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/crates/ide-completion/src/render/function.rs b/crates/ide-completion/src/render/function.rs
index 18151cffcd..97d5a25f49 100644
--- a/crates/ide-completion/src/render/function.rs
+++ b/crates/ide-completion/src/render/function.rs
@@ -27,7 +27,7 @@ enum FuncKind<'ctx> {
}
pub(crate) fn render_fn(
- ctx: RenderContext<'_>,
+ ctx: RenderContext<'_, '_>,
path_ctx: &PathCompletionCtx<'_>,
local_name: Option<hir::Name>,
func: hir::Function,
@@ -37,7 +37,7 @@ pub(crate) fn render_fn(
}
pub(crate) fn render_method(
- ctx: RenderContext<'_>,
+ ctx: RenderContext<'_, '_>,
dot_access: &DotAccess<'_>,
receiver: Option<SmolStr>,
local_name: Option<hir::Name>,
@@ -48,7 +48,7 @@ pub(crate) fn render_method(
}
fn render(
- ctx @ RenderContext { completion, .. }: RenderContext<'_>,
+ ctx @ RenderContext { completion, .. }: RenderContext<'_, '_>,
local_name: Option<hir::Name>,
func: hir::Function,
func_kind: FuncKind<'_>,
@@ -183,7 +183,7 @@ fn render(
fn compute_return_type_match(
db: &dyn HirDatabase,
- ctx: &RenderContext<'_>,
+ ctx: &RenderContext<'_, '_>,
self_type: hir::Type<'_>,
ret_type: &hir::Type<'_>,
) -> CompletionRelevanceReturnType {
@@ -210,7 +210,7 @@ fn compute_return_type_match(
pub(super) fn add_call_parens<'b>(
builder: &'b mut Builder,
- ctx: &CompletionContext<'_>,
+ ctx: &CompletionContext<'_, '_>,
cap: SnippetCap,
name: SmolStr,
escaped_name: SmolStr,
@@ -286,7 +286,7 @@ pub(super) fn add_call_parens<'b>(
builder.label(SmolStr::from_iter([&name, label_suffix])).insert_snippet(cap, snippet)
}
-fn ref_of_param(ctx: &CompletionContext<'_>, arg: &str, ty: &hir::Type<'_>) -> &'static str {
+fn ref_of_param(ctx: &CompletionContext<'_, '_>, arg: &str, ty: &hir::Type<'_>) -> &'static str {
if let Some(derefed_ty) = ty.remove_ref() {
for (name, local) in ctx.locals.iter().sorted_by_key(|&(k, _)| k.clone()) {
if name.as_str() == arg {
@@ -301,7 +301,7 @@ fn ref_of_param(ctx: &CompletionContext<'_>, arg: &str, ty: &hir::Type<'_>) -> &
""
}
-fn detail(ctx: &CompletionContext<'_>, func: hir::Function) -> String {
+fn detail(ctx: &CompletionContext<'_, '_>, func: hir::Function) -> String {
let mut ret_ty = func.ret_type(ctx.db);
let mut detail = String::new();
@@ -327,7 +327,7 @@ fn detail(ctx: &CompletionContext<'_>, func: hir::Function) -> String {
detail
}
-fn detail_full(ctx: &CompletionContext<'_>, func: hir::Function) -> String {
+fn detail_full(ctx: &CompletionContext<'_, '_>, func: hir::Function) -> String {
let signature = format!("{}", func.display(ctx.db, ctx.display_target));
let mut detail = String::with_capacity(signature.len());
@@ -342,7 +342,7 @@ fn detail_full(ctx: &CompletionContext<'_>, func: hir::Function) -> String {
detail
}
-fn params_display(ctx: &CompletionContext<'_>, detail: &mut String, func: hir::Function) {
+fn params_display(ctx: &CompletionContext<'_, '_>, detail: &mut String, func: hir::Function) {
if let Some(self_param) = func.self_param(ctx.db) {
format_to!(detail, "{}", self_param.display(ctx.db, ctx.display_target));
let assoc_fn_params = func.assoc_fn_params(ctx.db);
@@ -368,7 +368,7 @@ fn params_display(ctx: &CompletionContext<'_>, detail: &mut String, func: hir::F
}
fn params<'db>(
- ctx: &CompletionContext<'db>,
+ ctx: &CompletionContext<'_, 'db>,
func: hir::Function,
func_kind: &FuncKind<'_>,
has_dot_receiver: bool,