remove usages of .alignment = 0
This commit is contained in:
2
lib/compiler/aro/aro/Attribute.zig
vendored
2
lib/compiler/aro/aro/Attribute.zig
vendored
@@ -708,7 +708,7 @@ pub const Arguments = blk: {
|
||||
field.* = .{
|
||||
.name = decl.name,
|
||||
.type = @field(attributes, decl.name),
|
||||
.alignment = 0,
|
||||
.alignment = @alignOf(@field(attributes, decl.name)),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -939,7 +939,7 @@ fn CreateUniqueTuple(comptime N: comptime_int, comptime types: [N]type) type {
|
||||
.type = T,
|
||||
.default_value_ptr = null,
|
||||
.is_comptime = false,
|
||||
.alignment = 0,
|
||||
.alignment = @alignOf(T),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -8533,18 +8533,19 @@ pub const Metadata = enum(u32) {
|
||||
.type = []const u8,
|
||||
.default_value_ptr = null,
|
||||
.is_comptime = false,
|
||||
.alignment = 0,
|
||||
.alignment = @alignOf([]const u8),
|
||||
};
|
||||
}
|
||||
fmt_str = fmt_str ++ "(";
|
||||
inline for (fields[2..], names) |*field, name| {
|
||||
fmt_str = fmt_str ++ "{[" ++ name ++ "]f}";
|
||||
const T = std.fmt.Formatter(FormatData, format);
|
||||
field.* = .{
|
||||
.name = name,
|
||||
.type = std.fmt.Formatter(FormatData, format),
|
||||
.type = T,
|
||||
.default_value_ptr = null,
|
||||
.is_comptime = false,
|
||||
.alignment = 0,
|
||||
.alignment = @alignOf(T),
|
||||
};
|
||||
}
|
||||
fmt_str = fmt_str ++ ")\n";
|
||||
|
||||
Reference in New Issue
Block a user