Skip to content

Commit

Permalink
Update to latest Zig master
Browse files Browse the repository at this point in the history
Rename `builtin.Struct.field_type` to `builtin.Struct.type`.
  • Loading branch information
kubkon authored and Hejsil committed Dec 20, 2022
1 parent 8a38c14 commit 88edafd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions clap.zig
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ test "parseParams" {
},
.{
.id = .{
.desc =
.desc =
\\ This is
\\ help spanning multiple
\\ lines
Expand Down Expand Up @@ -769,8 +769,8 @@ pub fn parseEx(
// fields to slices and return that.
var result_args = Arguments(Id, params, value_parsers, .slice){};
inline for (meta.fields(@TypeOf(arguments))) |field| {
if (@typeInfo(field.field_type) == .Struct and
@hasDecl(field.field_type, "toOwnedSlice"))
if (@typeInfo(field.type) == .Struct and
@hasDecl(field.type, "toOwnedSlice"))
{
const slice = try @field(arguments, field.name).toOwnedSlice(allocator);
@field(result_args, field.name) = slice;
Expand Down Expand Up @@ -922,7 +922,7 @@ fn Arguments(

fields[i] = .{
.name = longest.name,
.field_type = @TypeOf(default_value),
.type = @TypeOf(default_value),
.default_value = @ptrCast(*const anyopaque, &default_value),
.is_comptime = false,
.alignment = @alignOf(@TypeOf(default_value)),
Expand Down

0 comments on commit 88edafd

Please sign in to comment.