- get_missing_assoc_items(&ctx.sema, &impl_def).into_iter().for_each(|item| match item {
- hir::AssocItem::Function(fn_item)
- if kind == ImplCompletionKind::All || kind == ImplCompletionKind::Fn =>
- {
- add_function_impl(&trigger, acc, ctx, fn_item, hir_impl)
+ get_missing_assoc_items(&ctx.sema, &impl_def).into_iter().for_each(|item| {
+ match (item, kind) {
+ (
+ hir::AssocItem::Function(fn_item),
+ ImplCompletionKind::All | ImplCompletionKind::Fn,
+ ) => add_function_impl(acc, ctx, &trigger, fn_item, hir_impl),
+ (
+ hir::AssocItem::TypeAlias(type_item),
+ ImplCompletionKind::All | ImplCompletionKind::TypeAlias,
+ ) => add_type_alias_impl(acc, ctx, &trigger, type_item),
+ (
+ hir::AssocItem::Const(const_item),
+ ImplCompletionKind::All | ImplCompletionKind::Const,
+ ) => add_const_impl(acc, ctx, &trigger, const_item, hir_impl),
+ _ => {}