pub(super) fn complete_record_literal(acc: &mut Completions, ctx: &CompletionContext) {
    let (ty, variant) = match ctx.record_lit_syntax.as_ref().and_then(|it| {
        Some((
            ctx.analyzer.type_of(ctx.db, &it.clone().into())?,
            ctx.analyzer.resolve_record_literal(it)?,
        ))
    }) {
        Some(it) => it,
        _ => return,
    };

    for (field, field_ty) in ty.variant_fields(ctx.db, variant) {
        acc.add_field(ctx, field, &field_ty);
    }
}
/// Complete fields in fields literals.
Complete fields in fields literals.
Complete fields in fields literals .
pub(super) fn complete_record_literal(acc: &mut Completions, ctx: &CompletionContext) {
    let (ty, variant) = match ctx.record_lit_syntax.as_ref().and_then(|it| {
        Some((
            ctx.analyzer.type_of(ctx.db, &it.clone().into())?,
            ctx.analyzer.resolve_record_literal(it)?,
        ))
    }) {
        Some(it) => it,
        _ => return,
    };
    for (field, field_ty) in ty.variant_fields(ctx.db, variant) {
        acc.add_field(ctx, field, &field_ty);
    }
}
pub ( super ) fn complete_record_literal ( acc : & mut Completions , ctx : & CompletionContext ) { let ( ty , variant ) = match ctx . record_lit_syntax . as_ref ( ) . and_then ( | it | { Some ( ( ctx . analyzer . type_of ( ctx . db , & it . clone ( ) . into ( ) ) ? , ctx . analyzer . resolve_record_literal ( it ) ? , ) ) } ) { Some ( it ) => it , _ => return , } ; for ( field , field_ty ) in ty . variant_fields ( ctx . db , variant ) { acc . add_field ( ctx , field , & field_ty ) ; } }
Complete fields in fields literals.
Complete fields in fields literals .
acc
&mut Completions
ctx
&CompletionContext