structstd.zig.Zir.Inst.StructInit[src]

Trailing is an item per field.

Fields

abs_node: Ast.Node.Index

If this is an anonymous initialization (the operand is poison), this instruction becomes the owner of a type. To resolve source locations, we need an absolute source node.

abs_line: u32

Likewise, we need an absolute line number.

fields_len: u32

Source Code

Source code
pub const StructInit = struct {
    /// If this is an anonymous initialization (the operand is poison), this instruction becomes the owner of a type.
    /// To resolve source locations, we need an absolute source node.
    abs_node: Ast.Node.Index,
    /// Likewise, we need an absolute line number.
    abs_line: u32,
    fields_len: u32,

    pub const Item = struct {
        /// The `struct_init_field_type` ZIR instruction for this field init.
        field_type: Index,
        /// The field init expression to be used as the field value. This value will be coerced
        /// to the field type if not already.
        init: Ref,
    };
}