internal: completion PathKind is not optional

This commit is contained in:
Lukas Wirth
2022-05-06 12:04:41 +02:00
parent dd3f5e0993
commit 57a9915c1f
12 changed files with 40 additions and 33 deletions

View File

@@ -273,7 +273,7 @@ fn render_resolution_simple_(
// Add `<>` for generic types
let type_path_no_ty_args = matches!(
ctx.completion.path_context,
Some(PathCompletionCtx { kind: Some(PathKind::Type), has_type_args: false, .. })
Some(PathCompletionCtx { kind: PathKind::Type, has_type_args: false, .. })
) && ctx.completion.config.add_call_parenthesis;
if type_path_no_ty_args {
if let Some(cap) = ctx.snippet_cap() {