pub fn BareUnion(comptime T: type) type 514
515
516
517
518
519
520pub fn BareUnion(comptime T: type) type {
const u = switch (@typeInfo(T)) {
.@"union" => |u| u,
else => @compileError("expected union type, found '" ++ @typeName(T) ++ "'"),
};
return @Union(u.layout, null, u.field_names, u.field_types[0..], u.field_attrs[0..]);
}