Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

ensureAllValuesUsed

ConfigHeader.ensureAllValuesUsed
fn ensureAllValuesUsed(
    maker: *Maker,
    step: *Step,
    value_map: *const ValueMap,
    src_path: Path,
) Step.ExtendedMakeError!void

File

lib/compiler/Maker/Step/ConfigHeader.zig:149

Code

fn ensureAllValuesUsed(
    maker: *Maker,
    step: *Step,
    value_map: *const ValueMap,
    src_path: Path,
) Step.ExtendedMakeError!void {
    var any_errors = false;
    for (value_map.keys(), value_map.values()) |name, used| {
        if (used) continue;
        try step.addError(maker, "{f}: config header value unused: {s}", .{ src_path, name });
        any_errors = true;
    }
    if (any_errors) return error.MakeFailed;
}