Skip to content

Commit

Permalink
Zig update: remove usages of anonymous structs
Browse files Browse the repository at this point in the history
  • Loading branch information
Vexu committed Nov 2, 2024
1 parent 18015a3 commit b56575e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/aro/Builtins.zig
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ fn createType(desc: TypeDescription, it: *TypeDescription.TypeIterator, comp: *c
.len = element_count,
.elem = child_ty,
};
const vector_ty = .{ .specifier = .vector, .data = .{ .array = arr_ty } };
const vector_ty: Type = .{ .specifier = .vector, .data = .{ .array = arr_ty } };
builder.specifier = Type.Builder.fromType(vector_ty);
},
.q => {
Expand Down
2 changes: 1 addition & 1 deletion src/aro/Parser.zig
Original file line number Diff line number Diff line change
Expand Up @@ -8254,7 +8254,7 @@ fn primaryExpr(p: *Parser) Error!Result {

fn makePredefinedIdentifier(p: *Parser, strings_top: usize) !Result {
const end: u32 = @intCast(p.strings.items.len);
const elem_ty = .{ .specifier = .char, .qual = .{ .@"const" = true } };
const elem_ty: Type = .{ .specifier = .char, .qual = .{ .@"const" = true } };
const arr_ty = try p.arena.create(Type.Array);
arr_ty.* = .{ .elem = elem_ty, .len = end - strings_top };
const ty: Type = .{ .specifier = .array, .data = .{ .array = arr_ty } };
Expand Down
2 changes: 1 addition & 1 deletion src/aro/text_literal.zig
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ pub const Parser = struct {
pub fn err(self: *Parser, tag: Diagnostics.Tag, extra: Diagnostics.Message.Extra) void {
if (self.errored) return;
self.errored = true;
const diagnostic = .{ .tag = tag, .extra = extra };
const diagnostic: CharDiagnostic = .{ .tag = tag, .extra = extra };
if (self.errors_len == self.errors_buffer.len) {
self.errors_buffer[self.errors_buffer.len - 1] = diagnostic;
} else {
Expand Down

0 comments on commit b56575e

Please sign in to comment.