_ExpressibleByArrayLiteral
public protocol _ExpressibleByArrayLiteralCompiler-internal protocol for array-literal lowering.
The lexer/parser lower [a, b, c] to a call into this init with a raw
pointer to a stack-allocated buffer of Elements. Only the compiler
uses this directly; user types should conform to
ExpressibleByArrayLiteral (which extends this with a friendlier API).
Associated Types
type Element
type ElementInitializers
init(_arrayLiteralPointer: consuming lang.ptr[Element], _arrayLiteralCount: consuming lang.i64)
init(_arrayLiteralPointer: consuming lang.ptr[Element], _arrayLiteralCount: consuming lang.i64)Compiler-emitted init taking a raw pointer and count.
Both params are consuming: the compiler hands ownership of the
stack buffer's address (and the count) over to the implementation,
which stores them in its own storage. This convention is what the
MIR lowering's structural predicate looks for — implementations
that deviate will be silently skipped during literal lowering.
Defined in lang/std/core/literals.ks