authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-05-20 02:44:52+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-05-20 10:23:16+02:00
log999777e73aa1bd06b05cbe53f8c2488877e18874
tree2a12be70cf488ace84478c9f9f583dc50bfa9717
parentd000e53b291afc40da7d676553f1c9685a38f169

compiler: Scaffold stage2_powerpc backend.

Nothing interesting here; literally just the bare minimum so I can work on this on and off in a branch without worrying about merge conflicts in the non-backend code.

19 files changed, 172 insertions(+), 41 deletions(-)

CMakeLists.txt+1
...@@ -543,6 +543,7 @@ set(ZIG_STAGE2_SOURCES...@@ -543,6 +543,7 @@ set(ZIG_STAGE2_SOURCES
543 src/arch/arm/Mir.zig543 src/arch/arm/Mir.zig
544 src/arch/arm/abi.zig544 src/arch/arm/abi.zig
545 src/arch/arm/bits.zig545 src/arch/arm/bits.zig
546 src/arch/powerpc/CodeGen.zig
546 src/arch/riscv64/abi.zig547 src/arch/riscv64/abi.zig
547 src/arch/riscv64/bits.zig548 src/arch/riscv64/bits.zig
548 src/arch/riscv64/CodeGen.zig549 src/arch/riscv64/CodeGen.zig
lib/compiler/test_runner.zig+3-1
...@@ -15,7 +15,9 @@ var fba_buffer: [8192]u8 = undefined;...@@ -15,7 +15,9 @@ var fba_buffer: [8192]u8 = undefined;
15var fba = std.heap.FixedBufferAllocator.init(&fba_buffer);15var fba = std.heap.FixedBufferAllocator.init(&fba_buffer);
1616
17const crippled = switch (builtin.zig_backend) {17const crippled = switch (builtin.zig_backend) {
18 .stage2_riscv64 => true,18 .stage2_powerpc,
19 .stage2_riscv64,
20 => true,
19 else => false,21 else => false,
20};22};
2123
lib/std/builtin.zig+9-4
...@@ -1110,6 +1110,9 @@ pub const CompilerBackend = enum(u64) {...@@ -1110,6 +1110,9 @@ pub const CompilerBackend = enum(u64) {
1110 /// The reference implementation self-hosted compiler of Zig, using the1110 /// The reference implementation self-hosted compiler of Zig, using the
1111 /// spirv backend.1111 /// spirv backend.
1112 stage2_spirv64 = 11,1112 stage2_spirv64 = 11,
1113 /// The reference implementation self-hosted compiler of Zig, using the
1114 /// powerpc backend.
1115 stage2_powerpc = 12,
11131116
1114 _,1117 _,
1115};1118};
...@@ -1143,10 +1146,12 @@ pub const panic: type = p: {...@@ -1143,10 +1146,12 @@ pub const panic: type = p: {
1143 if (@hasDecl(root, "Panic")) {1146 if (@hasDecl(root, "Panic")) {
1144 break :p root.Panic; // Deprecated; use `panic` instead.1147 break :p root.Panic; // Deprecated; use `panic` instead.
1145 }1148 }
1146 if (builtin.zig_backend == .stage2_riscv64) {1149 break :p switch (builtin.zig_backend) {
1147 break :p std.debug.simple_panic;1150 .stage2_powerpc,
1148 }1151 .stage2_riscv64,
1149 break :p std.debug.FullPanic(std.debug.defaultPanic);1152 => std.debug.simple_panic,
1153 else => std.debug.FullPanic(std.debug.defaultPanic),
1154 };
1150};1155};
11511156
1152pub noinline fn returnError() void {1157pub noinline fn returnError() void {
lib/std/debug.zig+14-9
...@@ -608,15 +608,20 @@ pub fn defaultPanic(...@@ -608,15 +608,20 @@ pub fn defaultPanic(
608608
609 // For backends that cannot handle the language features depended on by the609 // For backends that cannot handle the language features depended on by the
610 // default panic handler, we have a simpler panic handler:610 // default panic handler, we have a simpler panic handler:
611 if (builtin.zig_backend == .stage2_wasm or611 switch (builtin.zig_backend) {
612 builtin.zig_backend == .stage2_arm or612 .stage2_aarch64,
613 builtin.zig_backend == .stage2_aarch64 or613 .stage2_arm,
614 builtin.zig_backend == .stage2_x86 or614 .stage2_powerpc,
615 (builtin.zig_backend == .stage2_x86_64 and (builtin.target.ofmt != .elf and builtin.target.ofmt != .macho)) or615 .stage2_riscv64,
616 builtin.zig_backend == .stage2_sparc64 or616 .stage2_spirv64,
617 builtin.zig_backend == .stage2_spirv64)617 .stage2_wasm,
618 {618 .stage2_x86,
619 @trap();619 => @trap(),
620 .stage2_x86_64 => switch (builtin.target.ofmt) {
621 .elf, .macho => {},
622 else => @trap(),
623 },
624 else => {},
620 }625 }
621626
622 switch (builtin.os.tag) {627 switch (builtin.os.tag) {
lib/std/mem.zig+4-2
...@@ -675,10 +675,12 @@ test lessThan {...@@ -675,10 +675,12 @@ test lessThan {
675}675}
676676
677const eqlBytes_allowed = switch (builtin.zig_backend) {677const eqlBytes_allowed = switch (builtin.zig_backend) {
678 // These backends don't support vectors yet.
679 .stage2_powerpc,
680 .stage2_riscv64,
681 => false,
678 // The SPIR-V backend does not support the optimized path yet.682 // The SPIR-V backend does not support the optimized path yet.
679 .stage2_spirv64 => false,683 .stage2_spirv64 => false,
680 // The RISC-V does not support vectors.
681 .stage2_riscv64 => false,
682 // The naive memory comparison implementation is more useful for fuzzers to684 // The naive memory comparison implementation is more useful for fuzzers to
683 // find interesting inputs.685 // find interesting inputs.
684 else => !builtin.fuzz,686 else => !builtin.fuzz,
lib/std/os/linux.zig+6-1
...@@ -505,7 +505,12 @@ pub var elf_aux_maybe: ?[*]std.elf.Auxv = null;...@@ -505,7 +505,12 @@ pub var elf_aux_maybe: ?[*]std.elf.Auxv = null;
505/// Whether an external or internal getauxval implementation is used.505/// Whether an external or internal getauxval implementation is used.
506const extern_getauxval = switch (builtin.zig_backend) {506const extern_getauxval = switch (builtin.zig_backend) {
507 // Calling extern functions is not yet supported with these backends507 // Calling extern functions is not yet supported with these backends
508 .stage2_aarch64, .stage2_arm, .stage2_riscv64, .stage2_sparc64 => false,508 .stage2_aarch64,
509 .stage2_arm,
510 .stage2_powerpc,
511 .stage2_riscv64,
512 .stage2_sparc64,
513 => false,
509 else => !builtin.link_libc,514 else => !builtin.link_libc,
510};515};
511516
lib/std/start.zig+18-9
...@@ -14,12 +14,16 @@ const start_sym_name = if (native_arch.isMIPS()) "__start" else "_start";...@@ -14,12 +14,16 @@ const start_sym_name = if (native_arch.isMIPS()) "__start" else "_start";
14// The self-hosted compiler is not fully capable of handling all of this start.zig file.14// The self-hosted compiler is not fully capable of handling all of this start.zig file.
15// Until then, we have simplified logic here for self-hosted. TODO remove this once15// Until then, we have simplified logic here for self-hosted. TODO remove this once
16// self-hosted is capable enough to handle all of the real start.zig logic.16// self-hosted is capable enough to handle all of the real start.zig logic.
17pub const simplified_logic =17pub const simplified_logic = switch (builtin.zig_backend) {
18 builtin.zig_backend == .stage2_x86 or18 .stage2_aarch64,
19 builtin.zig_backend == .stage2_aarch64 or19 .stage2_arm,
20 builtin.zig_backend == .stage2_arm or20 .stage2_powerpc,
21 builtin.zig_backend == .stage2_sparc64 or21 .stage2_sparc64,
22 builtin.zig_backend == .stage2_spirv64;22 .stage2_spirv64,
23 .stage2_x86,
24 => true,
25 else => false,
26};
2327
24comptime {28comptime {
25 // No matter what, we import the root file, so that any export, test, comptime29 // No matter what, we import the root file, so that any export, test, comptime
...@@ -669,9 +673,14 @@ pub inline fn callMain() u8 {...@@ -669,9 +673,14 @@ pub inline fn callMain() u8 {
669 if (@typeInfo(ReturnType) != .error_union) @compileError(bad_main_ret);673 if (@typeInfo(ReturnType) != .error_union) @compileError(bad_main_ret);
670674
671 const result = root.main() catch |err| {675 const result = root.main() catch |err| {
672 if (builtin.zig_backend == .stage2_riscv64) {676 switch (builtin.zig_backend) {
673 std.debug.print("error: failed with error\n", .{});677 .stage2_powerpc,
674 return 1;678 .stage2_riscv64,
679 => {
680 std.debug.print("error: failed with error\n", .{});
681 return 1;
682 },
683 else => {},
675 }684 }
676 std.log.err("{s}", .{@errorName(err)});685 std.log.err("{s}", .{@errorName(err)});
677 if (@errorReturnTrace()) |trace| {686 if (@errorReturnTrace()) |trace| {
lib/std/testing.zig+7-1
...@@ -32,7 +32,13 @@ pub var allocator_instance: std.heap.GeneralPurposeAllocator(.{...@@ -32,7 +32,13 @@ pub var allocator_instance: std.heap.GeneralPurposeAllocator(.{
32pub var log_level = std.log.Level.warn;32pub var log_level = std.log.Level.warn;
3333
34// Disable printing in tests for simple backends.34// Disable printing in tests for simple backends.
35pub const backend_can_print = !(builtin.zig_backend == .stage2_spirv64 or builtin.zig_backend == .stage2_riscv64);35pub const backend_can_print = switch (builtin.zig_backend) {
36 .stage2_powerpc,
37 .stage2_riscv64,
38 .stage2_spirv64,
39 => false,
40 else => true,
41};
3642
37fn print(comptime fmt: []const u8, args: anytype) void {43fn print(comptime fmt: []const u8, args: anytype) void {
38 if (@inComptime()) {44 if (@inComptime()) {
lib/ubsan_rt.zig+3-1
...@@ -671,7 +671,9 @@ fn exportHandlerWithAbort(...@@ -671,7 +671,9 @@ fn exportHandlerWithAbort(
671}671}
672672
673const can_build_ubsan = switch (builtin.zig_backend) {673const can_build_ubsan = switch (builtin.zig_backend) {
674 .stage2_riscv64 => false,674 .stage2_powerpc,
675 .stage2_riscv64,
676 => false,
675 else => true,677 else => true,
676};678};
677679
src/Zcu.zig+20
...@@ -4500,6 +4500,26 @@ pub fn callconvSupported(zcu: *Zcu, cc: std.builtin.CallingConvention) union(enu...@@ -4500,6 +4500,26 @@ pub fn callconvSupported(zcu: *Zcu, cc: std.builtin.CallingConvention) union(enu
4500 .naked => true,4500 .naked => true,
4501 else => false,4501 else => false,
4502 },4502 },
4503 .stage2_powerpc => switch (target.cpu.arch) {
4504 .powerpc, .powerpcle => switch (cc) {
4505 .powerpc_sysv,
4506 .powerpc_sysv_altivec,
4507 .powerpc_aix,
4508 .powerpc_aix_altivec,
4509 .naked,
4510 => true,
4511 else => false,
4512 },
4513 .powerpc64, .powerpc64le => switch (cc) {
4514 .powerpc64_elf,
4515 .powerpc64_elf_altivec,
4516 .powerpc64_elf_v2,
4517 .naked,
4518 => true,
4519 else => false,
4520 },
4521 else => unreachable,
4522 },
4503 .stage2_riscv64 => switch (cc) {4523 .stage2_riscv64 => switch (cc) {
4504 .riscv64_lp64 => |opts| opts.incoming_stack_alignment == null,4524 .riscv64_lp64 => |opts| opts.incoming_stack_alignment == null,
4505 .naked => true,4525 .naked => true,
src/arch/powerpc/CodeGen.zig created+52
...@@ -0,0 +1,52 @@
1const builtin = @import("builtin");
2const std = @import("std");
3
4const Air = @import("../../Air.zig");
5const codegen = @import("../../codegen.zig");
6const InternPool = @import("../../InternPool.zig");
7const link = @import("../../link.zig");
8const Liveness = @import("../../Liveness.zig");
9const Zcu = @import("../../Zcu.zig");
10
11const assert = std.debug.assert;
12const log = std.log.scoped(.codegen);
13
14pub fn generate(
15 bin_file: *link.File,
16 pt: Zcu.PerThread,
17 src_loc: Zcu.LazySrcLoc,
18 func_index: InternPool.Index,
19 air: Air,
20 liveness: Liveness,
21 code: *std.ArrayListUnmanaged(u8),
22 debug_output: link.File.DebugInfoOutput,
23) codegen.CodeGenError!void {
24 _ = bin_file;
25 _ = pt;
26 _ = src_loc;
27 _ = func_index;
28 _ = air;
29 _ = liveness;
30 _ = code;
31 _ = debug_output;
32
33 unreachable;
34}
35
36pub fn generateLazy(
37 bin_file: *link.File,
38 pt: Zcu.PerThread,
39 src_loc: Zcu.LazySrcLoc,
40 lazy_sym: link.File.LazySymbol,
41 code: *std.ArrayListUnmanaged(u8),
42 debug_output: link.File.DebugInfoOutput,
43) codegen.CodeGenError!void {
44 _ = bin_file;
45 _ = pt;
46 _ = src_loc;
47 _ = lazy_sym;
48 _ = code;
49 _ = debug_output;
50
51 unreachable;
52}
src/codegen.zig+6-1
...@@ -37,6 +37,7 @@ fn importBackend(comptime backend: std.builtin.CompilerBackend) type {...@@ -37,6 +37,7 @@ fn importBackend(comptime backend: std.builtin.CompilerBackend) type {
37 return switch (backend) {37 return switch (backend) {
38 .stage2_aarch64 => @import("arch/aarch64/CodeGen.zig"),38 .stage2_aarch64 => @import("arch/aarch64/CodeGen.zig"),
39 .stage2_arm => @import("arch/arm/CodeGen.zig"),39 .stage2_arm => @import("arch/arm/CodeGen.zig"),
40 .stage2_powerpc => @import("arch/powerpc/CodeGen.zig"),
40 .stage2_riscv64 => @import("arch/riscv64/CodeGen.zig"),41 .stage2_riscv64 => @import("arch/riscv64/CodeGen.zig"),
41 .stage2_sparc64 => @import("arch/sparc64/CodeGen.zig"),42 .stage2_sparc64 => @import("arch/sparc64/CodeGen.zig"),
42 .stage2_x86_64 => @import("arch/x86_64/CodeGen.zig"),43 .stage2_x86_64 => @import("arch/x86_64/CodeGen.zig"),
...@@ -61,6 +62,7 @@ pub fn generateFunction(...@@ -61,6 +62,7 @@ pub fn generateFunction(
61 else => unreachable,62 else => unreachable,
62 inline .stage2_aarch64,63 inline .stage2_aarch64,
63 .stage2_arm,64 .stage2_arm,
65 .stage2_powerpc,
64 .stage2_riscv64,66 .stage2_riscv64,
65 .stage2_sparc64,67 .stage2_sparc64,
66 .stage2_x86_64,68 .stage2_x86_64,
...@@ -86,7 +88,10 @@ pub fn generateLazyFunction(...@@ -86,7 +88,10 @@ pub fn generateLazyFunction(
86 zcu.getTarget();88 zcu.getTarget();
87 switch (target_util.zigBackend(target, false)) {89 switch (target_util.zigBackend(target, false)) {
88 else => unreachable,90 else => unreachable,
89 inline .stage2_x86_64, .stage2_riscv64 => |backend| {91 inline .stage2_powerpc,
92 .stage2_riscv64,
93 .stage2_x86_64,
94 => |backend| {
90 dev.check(devFeatureForBackend(backend));95 dev.check(devFeatureForBackend(backend));
91 return importBackend(backend).generateLazy(lf, pt, src_loc, lazy_sym, code, debug_output);96 return importBackend(backend).generateLazy(lf, pt, src_loc, lazy_sym, code, debug_output);
92 },97 },
src/dev.zig+15
...@@ -26,6 +26,10 @@ pub const Env = enum {...@@ -26,6 +26,10 @@ pub const Env = enum {
26 /// - `zig build-* -fincremental -fno-llvm -fno-lld -target x86_64-linux --listen=-`26 /// - `zig build-* -fincremental -fno-llvm -fno-lld -target x86_64-linux --listen=-`
27 @"x86_64-linux",27 @"x86_64-linux",
2828
29 /// - sema
30 /// - `zig build-* -fincremental -fno-llvm -fno-lld -target powerpc(64)(le)-linux --listen=-`
31 @"powerpc-linux",
32
29 /// - sema33 /// - sema
30 /// - `zig build-* -fno-llvm -fno-lld -target riscv64-linux`34 /// - `zig build-* -fno-llvm -fno-lld -target riscv64-linux`
31 @"riscv64-linux",35 @"riscv64-linux",
...@@ -70,6 +74,7 @@ pub const Env = enum {...@@ -70,6 +74,7 @@ pub const Env = enum {
70 .x86_64_backend,74 .x86_64_backend,
71 .aarch64_backend,75 .aarch64_backend,
72 .x86_backend,76 .x86_backend,
77 .powerpc_backend,
73 .riscv64_backend,78 .riscv64_backend,
74 .sparc64_backend,79 .sparc64_backend,
75 .spirv64_backend,80 .spirv64_backend,
...@@ -144,6 +149,15 @@ pub const Env = enum {...@@ -144,6 +149,15 @@ pub const Env = enum {
144 => true,149 => true,
145 else => Env.sema.supports(feature),150 else => Env.sema.supports(feature),
146 },151 },
152 .@"powerpc-linux" => switch (feature) {
153 .build_command,
154 .stdio_listen,
155 .incremental,
156 .x86_64_backend,
157 .elf_linker,
158 => true,
159 else => Env.sema.supports(feature),
160 },
147 .@"riscv64-linux" => switch (feature) {161 .@"riscv64-linux" => switch (feature) {
148 .riscv64_backend,162 .riscv64_backend,
149 .elf_linker,163 .elf_linker,
...@@ -216,6 +230,7 @@ pub const Feature = enum {...@@ -216,6 +230,7 @@ pub const Feature = enum {
216 x86_64_backend,230 x86_64_backend,
217 aarch64_backend,231 aarch64_backend,
218 x86_backend,232 x86_backend,
233 powerpc_backend,
219 riscv64_backend,234 riscv64_backend,
220 sparc64_backend,235 sparc64_backend,
221 spirv64_backend,236 spirv64_backend,
src/target.zig+6-4
...@@ -736,6 +736,7 @@ pub fn supportsTailCall(target: std.Target, backend: std.builtin.CompilerBackend...@@ -736,6 +736,7 @@ pub fn supportsTailCall(target: std.Target, backend: std.builtin.CompilerBackend
736736
737pub fn supportsThreads(target: std.Target, backend: std.builtin.CompilerBackend) bool {737pub fn supportsThreads(target: std.Target, backend: std.builtin.CompilerBackend) bool {
738 return switch (backend) {738 return switch (backend) {
739 .stage2_powerpc => true,
739 .stage2_x86_64 => target.ofmt == .macho or target.ofmt == .elf,740 .stage2_x86_64 => target.ofmt == .macho or target.ofmt == .elf,
740 else => true,741 else => true,
741 };742 };
...@@ -796,14 +797,15 @@ pub fn zigBackend(target: std.Target, use_llvm: bool) std.builtin.CompilerBacken...@@ -796,14 +797,15 @@ pub fn zigBackend(target: std.Target, use_llvm: bool) std.builtin.CompilerBacken
796 if (use_llvm) return .stage2_llvm;797 if (use_llvm) return .stage2_llvm;
797 if (target.ofmt == .c) return .stage2_c;798 if (target.ofmt == .c) return .stage2_c;
798 return switch (target.cpu.arch) {799 return switch (target.cpu.arch) {
799 .wasm32, .wasm64 => .stage2_wasm,
800 .arm, .armeb, .thumb, .thumbeb => .stage2_arm,
801 .x86_64 => .stage2_x86_64,
802 .x86 => .stage2_x86,
803 .aarch64, .aarch64_be => .stage2_aarch64,800 .aarch64, .aarch64_be => .stage2_aarch64,
801 .arm, .armeb, .thumb, .thumbeb => .stage2_arm,
802 .powerpc, .powerpcle, .powerpc64, .powerpc64le => .stage2_powerpc,
804 .riscv64 => .stage2_riscv64,803 .riscv64 => .stage2_riscv64,
805 .sparc64 => .stage2_sparc64,804 .sparc64 => .stage2_sparc64,
806 .spirv64 => .stage2_spirv64,805 .spirv64 => .stage2_spirv64,
806 .wasm32, .wasm64 => .stage2_wasm,
807 .x86 => .stage2_x86,
808 .x86_64 => .stage2_x86_64,
807 else => .other,809 else => .other,
808 };810 };
809}811}
test/cases/compile_errors/@import_zon_bad_type.zig+3-3
...@@ -117,9 +117,9 @@ export fn testMutablePointer() void {...@@ -117,9 +117,9 @@ export fn testMutablePointer() void {
117// tmp.zig:37:38: note: imported here117// tmp.zig:37:38: note: imported here
118// neg_inf.zon:1:1: error: expected type '?u8'118// neg_inf.zon:1:1: error: expected type '?u8'
119// tmp.zig:57:28: note: imported here119// tmp.zig:57:28: note: imported here
120// neg_inf.zon:1:1: error: expected type 'tmp.testNonExhaustiveEnum__enum_496'120// neg_inf.zon:1:1: error: expected type 'tmp.testNonExhaustiveEnum__enum_499'
121// tmp.zig:62:39: note: imported here121// tmp.zig:62:39: note: imported here
122// neg_inf.zon:1:1: error: expected type 'tmp.testUntaggedUnion__union_498'122// neg_inf.zon:1:1: error: expected type 'tmp.testUntaggedUnion__union_501'
123// tmp.zig:67:44: note: imported here123// tmp.zig:67:44: note: imported here
124// neg_inf.zon:1:1: error: expected type 'tmp.testTaggedUnionVoid__union_501'124// neg_inf.zon:1:1: error: expected type 'tmp.testTaggedUnionVoid__union_504'
125// tmp.zig:72:50: note: imported here125// tmp.zig:72:50: note: imported here
test/cases/compile_errors/anytype_param_requires_comptime.zig+1-1
...@@ -15,6 +15,6 @@ pub export fn entry() void {...@@ -15,6 +15,6 @@ pub export fn entry() void {
15// error15// error
16//16//
17// :7:25: error: unable to resolve comptime value17// :7:25: error: unable to resolve comptime value
18// :7:25: note: initializer of comptime-only struct 'tmp.S.foo__anon_470.C' must be comptime-known18// :7:25: note: initializer of comptime-only struct 'tmp.S.foo__anon_473.C' must be comptime-known
19// :4:16: note: struct requires comptime because of this field19// :4:16: note: struct requires comptime because of this field
20// :4:16: note: types are not available at runtime20// :4:16: note: types are not available at runtime
test/cases/compile_errors/bogus_method_call_on_slice.zig+1-1
...@@ -16,5 +16,5 @@ pub export fn entry2() void {...@@ -16,5 +16,5 @@ pub export fn entry2() void {
16//16//
17// :3:6: error: no field or member function named 'copy' in '[]const u8'17// :3:6: error: no field or member function named 'copy' in '[]const u8'
18// :9:8: error: no field or member function named 'bar' in '@TypeOf(.{})'18// :9:8: error: no field or member function named 'bar' in '@TypeOf(.{})'
19// :12:18: error: no field or member function named 'bar' in 'tmp.entry2__struct_474'19// :12:18: error: no field or member function named 'bar' in 'tmp.entry2__struct_477'
20// :12:6: note: struct declared here20// :12:6: note: struct declared here
test/cases/compile_errors/coerce_anon_struct.zig+1-1
...@@ -6,6 +6,6 @@ export fn foo() void {...@@ -6,6 +6,6 @@ export fn foo() void {
66
7// error7// error
8//8//
9// :4:16: error: expected type 'tmp.T', found 'tmp.foo__struct_463'9// :4:16: error: expected type 'tmp.T', found 'tmp.foo__struct_466'
10// :3:16: note: struct declared here10// :3:16: note: struct declared here
11// :1:11: note: struct declared here11// :1:11: note: struct declared here
test/cases/compile_errors/redundant_try.zig+2-2
...@@ -44,9 +44,9 @@ comptime {...@@ -44,9 +44,9 @@ comptime {
44//44//
45// :5:23: error: expected error union type, found 'comptime_int'45// :5:23: error: expected error union type, found 'comptime_int'
46// :10:23: error: expected error union type, found '@TypeOf(.{})'46// :10:23: error: expected error union type, found '@TypeOf(.{})'
47// :15:23: error: expected error union type, found 'tmp.test2__struct_500'47// :15:23: error: expected error union type, found 'tmp.test2__struct_503'
48// :15:23: note: struct declared here48// :15:23: note: struct declared here
49// :20:27: error: expected error union type, found 'tmp.test3__struct_502'49// :20:27: error: expected error union type, found 'tmp.test3__struct_505'
50// :20:27: note: struct declared here50// :20:27: note: struct declared here
51// :25:23: error: expected error union type, found 'struct { comptime *const [5:0]u8 = "hello" }'51// :25:23: error: expected error union type, found 'struct { comptime *const [5:0]u8 = "hello" }'
52// :31:13: error: expected error union type, found 'u32'52// :31:13: error: expected error union type, found 'u32'