From cac60a05a7c253e197b26b7d707103feefb850f9 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 1 May 2023 20:14:17 -0700 Subject: [PATCH] std.builtin: give some enums integer types --- lib/std/builtin.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/std/builtin.zig b/lib/std/builtin.zig index ec69270d15..ff6d20370c 100644 --- a/lib/std/builtin.zig +++ b/lib/std/builtin.zig @@ -190,7 +190,7 @@ pub const CallingConvention = enum { /// This data structure is used by the Zig language code generation and /// therefore must be kept in sync with the compiler implementation. -pub const AddressSpace = enum { +pub const AddressSpace = enum(u4) { generic, gs, fs, @@ -283,7 +283,7 @@ pub const Type = union(enum) { /// This data structure is used by the Zig language code generation and /// therefore must be kept in sync with the compiler implementation. - pub const Size = enum { + pub const Size = enum(u2) { One, Many, Slice,