diff options
| author | Eric Joldasov <bratishkaerik@getgoogleoff.me> | 2023-06-05 00:01:28 +0600 |
|---|---|---|
| committer | Eric Joldasov <bratishkaerik@getgoogleoff.me> | 2023-06-13 23:46:56 +0600 |
| commit | ee821b2d7fa62310383bc22b527b1843aecc7e22 (patch) | |
| tree | bdbedafc72f3e84e1433340866389f2f9eb8866c | |
| parent | 53fc991abde044054991d3fed405cb6733572941 (diff) | |
| download | zig-ee821b2d7fa62310383bc22b527b1843aecc7e22.tar.gz zig-ee821b2d7fa62310383bc22b527b1843aecc7e22.zip | |
std.fmt: remove `e`, `E`, `z`, and `Z` specifiers (deprecated in 0.8)
Followup to cd7c870bd81391dd97c5c75eb3910382ba7280a1.
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
| -rw-r--r-- | lib/std/fmt.zig | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/std/fmt.zig b/lib/std/fmt.zig index ff8ce1c5f2..6896d0a7a0 100644 --- a/lib/std/fmt.zig +++ b/lib/std/fmt.zig @@ -971,12 +971,10 @@ fn checkTextFmt(comptime fmt: []const u8) void { if (fmt.len != 1) @compileError("unsupported format string '" ++ fmt ++ "' when formatting text"); switch (fmt[0]) { + // Example of deprecation: + // '[deprecated_specifier]' => @compileError("specifier '[deprecated_specifier]' has been deprecated, wrap your argument in `std.some_function` instead"), 'x' => @compileError("specifier 'x' has been deprecated, wrap your argument in std.fmt.fmtSliceHexLower instead"), 'X' => @compileError("specifier 'X' has been deprecated, wrap your argument in std.fmt.fmtSliceHexUpper instead"), - 'e' => @compileError("specifier 'e' has been deprecated, wrap your argument in std.fmt.fmtSliceEscapeLower instead"), - 'E' => @compileError("specifier 'E' has been deprecated, wrap your argument in std.fmt.fmtSliceEscapeUpper instead"), - 'z' => @compileError("specifier 'z' has been deprecated, wrap your argument in std.zig.fmtId instead"), - 'Z' => @compileError("specifier 'Z' has been deprecated, wrap your argument in std.zig.fmtEscapes instead"), else => {}, } } |
