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 standard library. Private Function
fnunusedResultExpr(gz: *GenZir, scope: *Scope, statement: Ast.Node.Index) InnerError!Ast.Node.OptionalIndex {
tryemitDbgNode(gz, statement);
// We need to emit an error if the result is not `noreturn` or `void`, but// we want to avoid adding the ZIR instruction if possible for performance.constmaybe_unused_result = tryexpr(gz, scope, .{ .rl = .none }, statement);
returnaddEnsureResult(gz, maybe_unused_result, statement);
}
Returns AST source node of the thing that is noreturn if the statement is definitely
noreturn. Otherwise returns .none.