diff options
| author | Isaac Freund <mail@isaacfreund.com> | 2022-08-08 18:39:14 +0200 |
|---|---|---|
| committer | Isaac Freund <mail@isaacfreund.com> | 2022-08-10 19:54:45 +0200 |
| commit | 0d32b73078aa4579187f7d5c67343a6036eed277 (patch) | |
| tree | 061cf1edf45d22198554159de00a7426748dad97 /lib/std/builtin.zig | |
| parent | bb1c3e8b7e2be201221e14719d2d39e6298cc66c (diff) | |
| download | zig-0d32b73078aa4579187f7d5c67343a6036eed277.tar.gz zig-0d32b73078aa4579187f7d5c67343a6036eed277.zip | |
stage2: Implement explicit backing integers for packed structs
Now the backing integer of a packed struct type may be explicitly
specified with e.g. `packed struct(u32) { ... }`.
Diffstat (limited to 'lib/std/builtin.zig')
| -rw-r--r-- | lib/std/builtin.zig | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/std/builtin.zig b/lib/std/builtin.zig index ef716c6972..2c2bc92c96 100644 --- a/lib/std/builtin.zig +++ b/lib/std/builtin.zig @@ -294,6 +294,8 @@ pub const Type = union(enum) { /// therefore must be kept in sync with the compiler implementation. pub const Struct = struct { layout: ContainerLayout, + /// Only valid if layout is .Packed + backing_integer: ?type = null, fields: []const StructField, decls: []const Declaration, is_tuple: bool, |
