diff options
| author | mlugg <mlugg@mlugg.co.uk> | 2024-08-28 02:35:53 +0100 |
|---|---|---|
| committer | mlugg <mlugg@mlugg.co.uk> | 2024-08-28 08:39:59 +0100 |
| commit | 0fe3fd01ddc2cd49c6a2b939577d16b9d2c65ea9 (patch) | |
| tree | 2c07fddf2b6230360fe618c4de192bc2d24eeaf7 /lib/std/Build/Cache.zig | |
| parent | 1a178d499537b922ff05c5d0186ed5a00dbb1a9b (diff) | |
| download | zig-0fe3fd01ddc2cd49c6a2b939577d16b9d2c65ea9.tar.gz zig-0fe3fd01ddc2cd49c6a2b939577d16b9d2c65ea9.zip | |
std: update `std.builtin.Type` fields to follow naming conventions
The compiler actually doesn't need any functional changes for this: Sema
does reification based on the tag indices of `std.builtin.Type` already!
So, no zig1.wasm update is necessary.
This change is necessary to disallow name clashes between fields and
decls on a type, which is a prerequisite of #9938.
Diffstat (limited to 'lib/std/Build/Cache.zig')
| -rw-r--r-- | lib/std/Build/Cache.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/std/Build/Cache.zig b/lib/std/Build/Cache.zig index 1eabdd54e6..93908807eb 100644 --- a/lib/std/Build/Cache.zig +++ b/lib/std/Build/Cache.zig @@ -222,7 +222,7 @@ pub const HashHelper = struct { .hexstring => |hex_string| hh.addBytes(hex_string.toSlice()), }, else => switch (@typeInfo(@TypeOf(x))) { - .Bool, .Int, .Enum, .Array => hh.addBytes(mem.asBytes(&x)), + .bool, .int, .@"enum", .array => hh.addBytes(mem.asBytes(&x)), else => @compileError("unable to hash type " ++ @typeName(@TypeOf(x))), }, } @@ -1014,7 +1014,7 @@ pub const Manifest = struct { } pub fn populateFileSystemInputs(man: *Manifest, buf: *std.ArrayListUnmanaged(u8)) Allocator.Error!void { - assert(@typeInfo(std.zig.Server.Message.PathPrefix).Enum.fields.len == man.cache.prefixes_len); + assert(@typeInfo(std.zig.Server.Message.PathPrefix).@"enum".fields.len == man.cache.prefixes_len); buf.clearRetainingCapacity(); const gpa = man.cache.gpa; const files = man.files.keys(); @@ -1032,7 +1032,7 @@ pub const Manifest = struct { pub fn populateOtherManifest(man: *Manifest, other: *Manifest, prefix_map: [4]u8) Allocator.Error!void { const gpa = other.cache.gpa; - assert(@typeInfo(std.zig.Server.Message.PathPrefix).Enum.fields.len == man.cache.prefixes_len); + assert(@typeInfo(std.zig.Server.Message.PathPrefix).@"enum".fields.len == man.cache.prefixes_len); assert(man.cache.prefixes_len == 4); for (man.files.keys()) |file| { const prefixed_path: PrefixedPath = .{ |
