authorgravatar for bratishkaerik@getgoogleoff.meEric Joldasov <bratishkaerik@getgoogleoff.me> 2023-06-05 00:01:28+06:00
committergravatar for bratishkaerik@getgoogleoff.meEric Joldasov <bratishkaerik@getgoogleoff.me> 2023-06-13 23:46:56+06:00
logee821b2d7fa62310383bc22b527b1843aecc7e22
treebdbedafc72f3e84e1433340866389f2f9eb8866c
parent53fc991abde044054991d3fed405cb6733572941
signaturelock-open Commit is signed but in an unrecognized format.

std.fmt: remove `e`, `E`, `z`, and `Z` specifiers (deprecated in 0.8)

Followup to cd7c870bd81391dd97c5c75eb3910382ba7280a1. Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>

1 files changed, 2 insertions(+), 4 deletions(-)

lib/std/fmt.zig+2-4
...@@ -971,12 +971,10 @@ fn checkTextFmt(comptime fmt: []const u8) void {...@@ -971,12 +971,10 @@ fn checkTextFmt(comptime fmt: []const u8) void {
971 if (fmt.len != 1)971 if (fmt.len != 1)
972 @compileError("unsupported format string '" ++ fmt ++ "' when formatting text");972 @compileError("unsupported format string '" ++ fmt ++ "' when formatting text");
973 switch (fmt[0]) {973 switch (fmt[0]) {
974 // Example of deprecation:
975 // '[deprecated_specifier]' => @compileError("specifier '[deprecated_specifier]' has been deprecated, wrap your argument in `std.some_function` instead"),
974 'x' => @compileError("specifier 'x' has been deprecated, wrap your argument in std.fmt.fmtSliceHexLower instead"),976 'x' => @compileError("specifier 'x' has been deprecated, wrap your argument in std.fmt.fmtSliceHexLower instead"),
975 'X' => @compileError("specifier 'X' has been deprecated, wrap your argument in std.fmt.fmtSliceHexUpper instead"),977 'X' => @compileError("specifier 'X' has been deprecated, wrap your argument in std.fmt.fmtSliceHexUpper instead"),
976 'e' => @compileError("specifier 'e' has been deprecated, wrap your argument in std.fmt.fmtSliceEscapeLower instead"),
977 'E' => @compileError("specifier 'E' has been deprecated, wrap your argument in std.fmt.fmtSliceEscapeUpper instead"),
978 'z' => @compileError("specifier 'z' has been deprecated, wrap your argument in std.zig.fmtId instead"),
979 'Z' => @compileError("specifier 'Z' has been deprecated, wrap your argument in std.zig.fmtEscapes instead"),
980 else => {},978 else => {},
981 }979 }
982}980}