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.

rvalue

Applies rl semantics to result. Expressions which do not do their own handling of result locations must call this function on their result. As an example, if ri.rl is .ptr, it will write the result to the pointer. If ri.rl is .ty, it will coerce the result to the type. Assumes nothing stacked on gz.

AstGen.rvalue
fn rvalue(
    gz: *GenZir,
    ri: ResultInfo,
    raw_result: Zir.Inst.Ref,
    src_node: Ast.Node.Index,
) InnerError!Zir.Inst.Ref

File

lib/std/zig/AstGen.zig:10455

Code

fn rvalue(
    gz: *GenZir,
    ri: ResultInfo,
    raw_result: Zir.Inst.Ref,
    src_node: Ast.Node.Index,
) InnerError!Zir.Inst.Ref {
    return rvalueInner(gz, ri, raw_result, src_node, true);
}