pub const OptionalIndex = enum(u32) pub fn unwrap(oi: OptionalIndex) ?Index2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223 pub const OptionalIndex = enum(u32) {
/// ZIR is structured so that the outermost "main" struct of any file
/// is always at index 0.
main_struct_inst = 0,
none = std.math.maxInt(u32),
_,
pub fn unwrap(oi: OptionalIndex) ?Index {
return if (oi == .none) null else @fromBackingInt(@intCast(@backingInt(oi)));
}
}