diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-07-03 18:30:07 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-07-07 22:43:52 -0700 |
| commit | 30c2921eb87c3157d52edd7d8ee874209a0f7538 (patch) | |
| tree | 876d4864abe53e1b43afa87b6e0f61572179ff86 /src/codegen/c.zig | |
| parent | d09b99d043cc097de569fb32938a423342490a83 (diff) | |
| download | zig-30c2921eb87c3157d52edd7d8ee874209a0f7538.tar.gz zig-30c2921eb87c3157d52edd7d8ee874209a0f7538.zip | |
compiler: update a bunch of format strings
Diffstat (limited to 'src/codegen/c.zig')
| -rw-r--r-- | src/codegen/c.zig | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/codegen/c.zig b/src/codegen/c.zig index a0bf0e271b..a06ce22b92 100644 --- a/src/codegen/c.zig +++ b/src/codegen/c.zig @@ -388,7 +388,7 @@ fn formatCTypePoolString(data: CTypePoolStringFormatData, w: *std.io.Writer) std if (data.ctype_pool_string.toSlice(data.ctype_pool)) |slice| try formatIdentOptions(slice, w, data.solo) else - try w.print("{}", .{data.ctype_pool_string.fmt(data.ctype_pool)}); + try w.print("{f}", .{data.ctype_pool_string.fmt(data.ctype_pool)}); } pub fn fmtCTypePoolString( ctype_pool_string: CType.Pool.String, @@ -2471,15 +2471,7 @@ const RenderCTypeTrailing = enum { no_space, maybe_space, - pub fn format( - self: @This(), - comptime fmt: []const u8, - _: std.fmt.FormatOptions, - w: *Writer, - ) @TypeOf(w).Error!void { - if (fmt.len != 0) - @compileError("invalid format string '" ++ fmt ++ "' for type '" ++ - @typeName(@This()) ++ "'"); + pub fn format(self: @This(), w: *Writer, comptime fmt: []const u8) Writer.Error!void { comptime assert(fmt.len == 0); switch (self) { .no_space => {}, |
