diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-07-03 18:50:16 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-07-07 22:43:52 -0700 |
| commit | 9c8aef55b4e287197b552ef18e7dd008e3a527bc (patch) | |
| tree | 0bbe77c197c55f57a22ab7e2657ce75fac24a80d /src/arch/wasm/CodeGen.zig | |
| parent | 30c2921eb87c3157d52edd7d8ee874209a0f7538 (diff) | |
| download | zig-9c8aef55b4e287197b552ef18e7dd008e3a527bc.tar.gz zig-9c8aef55b4e287197b552ef18e7dd008e3a527bc.zip | |
std.fmt.format: use {t} for tag name rather than {s}
prevents footgun when formatted type changes from string to enum
Diffstat (limited to 'src/arch/wasm/CodeGen.zig')
| -rw-r--r-- | src/arch/wasm/CodeGen.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/arch/wasm/CodeGen.zig b/src/arch/wasm/CodeGen.zig index 4a36eed402..44f6ac78a4 100644 --- a/src/arch/wasm/CodeGen.zig +++ b/src/arch/wasm/CodeGen.zig @@ -2046,7 +2046,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void { try cg.genInst(inst); if (std.debug.runtime_safety and cg.air_bookkeeping < old_bookkeeping_value + 1) { - std.debug.panic("Missing call to `finishAir` in AIR instruction %{d} ('{s}')", .{ + std.debug.panic("Missing call to `finishAir` in AIR instruction %{d} ('{t}')", .{ inst, cg.air.instructions.items(.tag)[@intFromEnum(inst)], }); @@ -3326,7 +3326,7 @@ fn emitUndefined(cg: *CodeGen, ty: Type) InnerError!WValue { }, else => unreachable, }, - else => return cg.fail("Wasm TODO: emitUndefined for type: {s}\n", .{ty.zigTypeTag(zcu)}), + else => return cg.fail("Wasm TODO: emitUndefined for type: {t}\n", .{ty.zigTypeTag(zcu)}), } } |
