commit 85492f2b9146b91470ca613cf5208906fff12701 (tree)
parent 9360cfebc722d99a54b576fff8bcfc0f0354ad41
Author: Andrew Kelley <andrew@ziglang.org>
Date: Sun, 12 Jun 2022 00:56:01 -0700
std.mem.zeroes: remove call to std.meta
everybody is so horny for std.meta
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/std/mem.zig b/lib/std/mem.zig
@@ -268,7 +268,7 @@ pub fn zeroes(comptime T: type) T {
},
.Struct => |struct_info| {
if (@sizeOf(T) == 0) return T{};
- if (comptime meta.containerLayout(T) == .Extern) {
+ if (struct_info.layout == .Extern) {
var item: T = undefined;
set(u8, asBytes(&item), 0);
return item;