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 /src/Compilation.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 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index 3ba53083ea..3d40957a72 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -384,7 +384,7 @@ const Job = union(enum) { /// The value is the index into `system_libs`. windows_import_lib: usize, - const Tag = @typeInfo(Job).Union.tag_type.?; + const Tag = @typeInfo(Job).@"union".tag_type.?; fn stage(tag: Tag) usize { return switch (tag) { // Prioritize functions so that codegen can get to work on them on a @@ -911,7 +911,7 @@ pub const cache_helpers = struct { } pub fn addDebugFormat(hh: *Cache.HashHelper, x: Config.DebugFormat) void { - const tag: @typeInfo(Config.DebugFormat).Union.tag_type.? = x; + const tag: @typeInfo(Config.DebugFormat).@"union".tag_type.? = x; hh.add(tag); switch (x) { .strip, .code_view => {}, @@ -1486,7 +1486,7 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil .emit_asm = options.emit_asm, .emit_llvm_ir = options.emit_llvm_ir, .emit_llvm_bc = options.emit_llvm_bc, - .work_queues = .{std.fifo.LinearFifo(Job, .Dynamic).init(gpa)} ** @typeInfo(std.meta.FieldType(Compilation, .work_queues)).Array.len, + .work_queues = .{std.fifo.LinearFifo(Job, .Dynamic).init(gpa)} ** @typeInfo(std.meta.FieldType(Compilation, .work_queues)).array.len, .codegen_work = if (InternPool.single_threaded) {} else .{ .mutex = .{}, .cond = .{}, @@ -3113,8 +3113,8 @@ pub fn getAllErrorsAlloc(comp: *Compilation) !ErrorBundle { err: *?Error, const Error = @typeInfo( - @typeInfo(@TypeOf(Zcu.SrcLoc.span)).Fn.return_type.?, - ).ErrorUnion.error_set; + @typeInfo(@TypeOf(Zcu.SrcLoc.span)).@"fn".return_type.?, + ).error_union.error_set; pub fn lessThan(ctx: @This(), lhs_index: usize, rhs_index: usize) bool { if (ctx.err.*) |_| return lhs_index < rhs_index; |
