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

anyErrdefers

Private Function
std.zig.AstGen.anyErrdefers
fn anyErrdefers(outer_scope: *Scope, inner_scope: *Scope) bool

Params

File

zig/AstGen.zig:2976
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
fn anyErrdefers(outer_scope: *Scope, inner_scope: *Scope) bool {
    var scope = inner_scope;
    while (scope != outer_scope) {
        switch (scope.unwrap()) {
            .gen_zir => |gen_zir| scope = gen_zir.parent,
            .local_val => |local_val| scope = local_val.parent,
            .local_ptr => |local_ptr| scope = local_ptr.parent,
            .defer_normal => |defer_normal| scope = defer_normal.parent,
            .defer_error => return true,
            .namespace => unreachable,
            .top => unreachable,
        }
    }
    return false;
}