diff --git a/flake.lock b/flake.lock index 164aa2aeb..29f0de4cd 100644 --- a/flake.lock +++ b/flake.lock @@ -109,11 +109,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1671236459, - "narHash": "sha256-J9Ow+I5cLUGE8IJMV08TAZP1DD4EP1TYnqgXVDIVzSU=", + "lastModified": 1671668597, + "narHash": "sha256-oD+Zx3IeXx2d91AiD5O74P4582iRPTPabCt6HDhagSo=", "owner": "mitchellh", "repo": "zig-overlay", - "rev": "9a123723c252f3d2aad8523a6fbcba1b7a3c9698", + "rev": "64fcf1f2efcc63e97830e203f8e64ca20137ffa2", "type": "github" }, "original": { diff --git a/pkg/libuv/handle.zig b/pkg/libuv/handle.zig index b9c8bb8ae..616c25f0b 100644 --- a/pkg/libuv/handle.zig +++ b/pkg/libuv/handle.zig @@ -14,7 +14,7 @@ pub fn Handle(comptime T: type) type { return struct { // note: this has to be here: https://github.com/ziglang/zig/issues/11367 const tInfo = @typeInfo(T).Struct; - const HandleType = tInfo.fields[0].field_type; + const HandleType = tInfo.fields[0].type; // Request handle to be closed. close_cb will be called asynchronously // after this call. This MUST be called on each handle before memory diff --git a/pkg/libuv/stream.zig b/pkg/libuv/stream.zig index 8cee41124..d7d8fcbcd 100644 --- a/pkg/libuv/stream.zig +++ b/pkg/libuv/stream.zig @@ -18,7 +18,7 @@ pub fn Stream(comptime T: type) type { return struct { // note: this has to be here: https://github.com/ziglang/zig/issues/11367 const tInfo = @typeInfo(T).Struct; - const HandleType = tInfo.fields[0].field_type; + const HandleType = tInfo.fields[0].type; /// Returns 1 if the stream is readable, 0 otherwise. pub fn isReadable(self: T) !bool { @@ -165,7 +165,7 @@ pub const WriteReq = struct { /// T should be a high-level handle type such as "Pipe". pub fn handle(self: WriteReq, comptime HT: type) ?HT { const tInfo = @typeInfo(HT).Struct; - const HandleType = tInfo.fields[0].field_type; + const HandleType = tInfo.fields[0].type; return if (self.req.handle) |ptr| return HT{ .handle = @ptrCast(HandleType, ptr) } diff --git a/pkg/objc/msg_send.zig b/pkg/objc/msg_send.zig index b2258f496..ce0d049b2 100644 --- a/pkg/objc/msg_send.zig +++ b/pkg/objc/msg_send.zig @@ -126,23 +126,23 @@ fn MsgSendFn( // Build up our argument types. const Fn = std.builtin.Type.Fn; - const args: []Fn.Param = args: { + const params: []Fn.Param = params: { var acc: [argsInfo.fields.len + 2]Fn.Param = undefined; // First argument is always the target and selector. - acc[0] = .{ .arg_type = Target, .is_generic = false, .is_noalias = false }; - acc[1] = .{ .arg_type = c.SEL, .is_generic = false, .is_noalias = false }; + acc[0] = .{ .type = Target, .is_generic = false, .is_noalias = false }; + acc[1] = .{ .type = c.SEL, .is_generic = false, .is_noalias = false }; // Remaining arguments depend on the args given, in the order given for (argsInfo.fields) |field, i| { acc[i + 2] = .{ - .arg_type = field.field_type, + .type = field.type, .is_generic = false, .is_noalias = false, }; } - break :args &acc; + break :params &acc; }; // Copy the alignment of a normal function type so equality works @@ -156,7 +156,7 @@ fn MsgSendFn( .is_generic = false, .is_var_args = false, .return_type = Return, - .args = args, + .params = params, }, }); } diff --git a/src/cli_args.zig b/src/cli_args.zig index 6dc03da4e..b92673b63 100644 --- a/src/cli_args.zig +++ b/src/cli_args.zig @@ -87,9 +87,9 @@ fn parseIntoField( // For optional fields, we just treat it as the child type. // This lets optional fields default to null but get set by // the CLI. - const Field = switch (@typeInfo(field.field_type)) { + const Field = switch (@typeInfo(field.type)) { .Optional => |opt| opt.child, - else => field.field_type, + else => field.type, }; const fieldInfo = @typeInfo(Field); @@ -97,7 +97,7 @@ fn parseIntoField( // that to set the value. if (fieldInfo == .Struct and @hasDecl(Field, "parseCLI")) { const fnInfo = @typeInfo(@TypeOf(Field.parseCLI)).Fn; - switch (fnInfo.args.len) { + switch (fnInfo.params.len) { // 1 arg = (input) => output 1 => @field(dst, field.name) = try Field.parseCLI(value), @@ -291,11 +291,11 @@ test "parseIntoField: unsigned numbers" { const alloc = arena.allocator(); var data: struct { - @"u8": u8, + u8: u8, } = undefined; try parseIntoField(@TypeOf(data), alloc, &data, "u8", "1"); - try testing.expectEqual(@as(u8, 1), data.@"u8"); + try testing.expectEqual(@as(u8, 1), data.u8); } test "parseIntoField: optional field" { diff --git a/src/input/Binding.zig b/src/input/Binding.zig index 3e29f1080..9ba82e1de 100644 --- a/src/input/Binding.zig +++ b/src/input/Binding.zig @@ -42,7 +42,7 @@ pub fn parse(input: []const u8) !Binding { // Check if its a modifier const modsInfo = @typeInfo(key.Mods).Struct; inline for (modsInfo.fields) |field| { - if (field.field_type == bool) { + if (field.type == bool) { if (std.mem.eql(u8, part, field.name)) { // Repeat not allowed if (@field(result.mods, field.name)) return Error.InvalidFormat; @@ -90,7 +90,7 @@ pub fn parse(input: []const u8) !Binding { inline for (actionInfo.fields) |field| { if (std.mem.eql(u8, action, field.name)) { // If the field type is void we expect no value - switch (field.field_type) { + switch (field.type) { void => { if (colonIdx != null) return Error.InvalidFormat; break :action @unionInit(Action, field.name, {}); diff --git a/vendor/zig-libxml2 b/vendor/zig-libxml2 index 47fc435b1..2fad039cd 160000 --- a/vendor/zig-libxml2 +++ b/vendor/zig-libxml2 @@ -1 +1 @@ -Subproject commit 47fc435b1b5885345693a09b19f2fdcfb91082d8 +Subproject commit 2fad039cd983084b615347333790680983c2f4d4