const SwitchNonErr = union(enum)
const SwitchNonErr = union(enum) {
/// A regular switch expression.
/// Emits `switch_block[_ref]`.
none,
/// `eu catch |err| switch (err) { ... }`
///
/// `switch` must not be labeled.
/// Emits `switch_block_err_union`.
@"catch",
/// `if (eu) |payload| { ... } else |err| switch (err) { ... }`
///
/// `switch` must not be labeled.
/// Emits `switch_block_err_union`.
@"if": Ast.full.If,
/// `eu catch |err| label: switch (err) { ... }`
/// `if (eu) |payload| { ... } else |err| label: switch (err) { ... }`
///
/// `switch` must be labeled.
/// Emits a `condbr` on the non-error body and a regular switch, though the
/// non-error prong and all `break`s from switch prongs are peers.
/// Exists to avoid a rather complex special case of `switch_block_err_union`.
peer_break_target: struct {
/// Refers to the enclosing block of the entire switch-on-err expression.
block_inst: Zir.Inst.Index,
/// Belongs to `block_inst`.
block_ri: ResultInfo,
},
}