Skip to main content

literal_struct_id

Function literal_struct_id 

Source
pub fn literal_struct_id(
    namespace: &[SmolStr],
    fields: &[(SmolStr, Expr, Span, Span)],
    type_args: &[TypeExpr],
    base: Option<&Expr>,
    span: Span,
    v: &mut Vec<Variable>,
    ctx: Ctx,
    state: &mut State<'_>,
) -> u16
Expand description

Resolves the struct a literal names.

This is struct_literal_id with one more source for a generic type’s arguments: a literal that writes none and takes its other fields from a ..base of that type is the base’s instantiation.