Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
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

rvalue

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

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.

Params

Errors

OutOfMemory
AnalysisFail

File

zig/AstGen.zig:10479
10479
10480
10481
10482
10483
10484
10485
10486
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);
}