DoxigAlpha

message

Function parameters

Parameters

#

Type definitions in this namespace

Types

#
EnvVar
Collects all the environment variables that Zig could possibly inspect, so
EmitArtifact
Every kind of artifact which the compiler can emit.

Functions in this namespace

Functions

#
binNameAlloc
Returns the standard file system basename of a binary generated by the Zig compiler.
serializeCpu
Renders a `std.Target.Cpu` value into a textual representation that can be parsed
fmtId
Return a Formatter for a Zig identifier, escaping it with `@""` syntax if needed.
fmtIdFlags
Return a Formatter for a Zig identifier, escaping it with `@""` syntax if needed.
fmtString
Return a formatter for escaping a double quoted Zig string.
fmtChar
Return a formatter for escaping a single quoted Zig string.
stringEscape
Print the string as escaped contents of a double quoted string.
charEscape
Print as escaped contents of a single-quoted string.
readSourceFileToEndAlloc
If the source can be UTF-16LE encoded, this function asserts that `gpa`

There are many assumptions in the entire codebase that Zig source files can

Values

#
max_src_size
There are many assumptions in the entire codebase that Zig source files can

Source

Implementation

#
pub fn message(r: SimpleComptimeReason) []const u8 {
    return switch (r) {
        // zig fmt: off
        .operand_Type                => "operand to '@Type' must be comptime-known",
        .operand_setEvalBranchQuota  => "operand to '@setEvalBranchQuota' must be comptime-known",
        .operand_setFloatMode        => "operand to '@setFloatMode' must be comptime-known",
        .operand_branchHint          => "operand to '@branchHint' must be comptime-known",
        .operand_setRuntimeSafety    => "operand to '@setRuntimeSafety' must be comptime-known",
        .operand_embedFile           => "operand to '@embedFile' must be comptime-known",
        .operand_cImport             => "operand to '@cImport' is evaluated at comptime",
        .operand_cDefine_macro_name  => "'@cDefine' macro name must be comptime-known",
        .operand_cDefine_macro_value => "'@cDefine' macro value must be comptime-known",
        .operand_cInclude_file_name  => "'@cInclude' file name must be comptime-known",
        .operand_cUndef_macro_name   => "'@cUndef' macro name must be comptime-known",
        .operand_shuffle_mask        => "'@shuffle' mask must be comptime-known",
        .operand_atomicRmw_operation => "'@atomicRmw' operation must be comptime-known",
        .operand_reduce_operation    => "'@reduce' operation must be comptime-known",

        .export_target        => "export target must be comptime-known",
        .export_options       => "export options must be comptime-known",
        .extern_options       => "extern options must be comptime-known",
        .prefetch_options     => "prefetch options must be comptime-known",
        .call_modifier        => "call modifier must be comptime-known",
        .compile_error_string => "compile error string must be comptime-known",
        .inline_assembly_code => "inline assembly code must be comptime-known",
        .atomic_order         => "atomic order must be comptime-known",
        .array_mul_factor     => "array multiplication factor must be comptime-known",
        .slice_cat_operand    => "slice being concatenated must be comptime-known",
        .inline_call_target   => "function being called inline must be comptime-known",
        .generic_call_target  => "generic function being called must be comptime-known",
        .wasm_memory_index    => "wasm memory index must be comptime-known",
        .work_group_dim_index => "work group dimension index must be comptime-known",
        .clobber              => "clobber must be comptime-known",

        .type                => "types must be comptime-known",
        .array_sentinel      => "array sentinel value must be comptime-known",
        .pointer_sentinel    => "pointer sentinel value must be comptime-known",
        .slice_sentinel      => "slice sentinel value must be comptime-known",
        .array_length        => "array length must be comptime-known",
        .vector_length       => "vector length must be comptime-known",
        .error_set_contents  => "error set contents must be comptime-known",
        .struct_fields       => "struct fields must be comptime-known",
        .enum_fields         => "enum fields must be comptime-known",
        .union_fields        => "union fields must be comptime-known",
        .function_ret_ty     => "function return type must be comptime-known",
        .function_parameters => "function parameters must be comptime-known",

        .decl_name         => "declaration name must be comptime-known",
        .field_name        => "field name must be comptime-known",
        .struct_field_name => "struct field name must be comptime-known",
        .enum_field_name   => "enum field name must be comptime-known",
        .union_field_name  => "union field name must be comptime-known",
        .tuple_field_name  => "tuple field name must be comptime-known",
        .tuple_field_index => "tuple field index must be comptime-known",

        .container_var_init => "initializer of container-level variable must be comptime-known",
        .@"callconv"        => "calling convention must be comptime-known",
        .@"align"           => "alignment must be comptime-known",
        .@"addrspace"       => "address space must be comptime-known",
        .@"linksection"     => "linksection must be comptime-known",

        .comptime_keyword             => "'comptime' keyword forces comptime evaluation",
        .comptime_call_modifier       => "'.compile_time' call modifier forces comptime evaluation",
        .inline_loop_operand          => "inline loop condition must be comptime-known",
        .switch_item                  => "switch prong values must be comptime-known",
        .tuple_field_default_value    => "tuple field default value must be comptime-known",
        .struct_field_default_value   => "struct field default value must be comptime-known",
        .enum_field_tag_value         => "enum field tag value must be comptime-known",
        .slice_single_item_ptr_bounds => "slice of single-item pointer must have comptime-known bounds",
        .stored_to_comptime_field     => "value stored to a comptime field must be comptime-known",
        .stored_to_comptime_var       => "value stored to a comptime variable must be comptime-known",
        .casted_to_comptime_enum      => "value casted to enum with 'comptime_int' tag type must be comptime-known",
        .casted_to_comptime_int       => "value casted to 'comptime_int' must be comptime-known",
        .casted_to_comptime_float     => "value casted to 'comptime_float' must be comptime-known",
        .panic_handler                => "panic handler must be comptime-known",
        // zig fmt: on
    };
}