aboutsummaryrefslogtreecommitdiff
path: root/lib/std
diff options
context:
space:
mode:
authorEric Joldasov <bratishkaerik@getgoogleoff.me>2023-06-05 00:01:28 +0600
committerEric Joldasov <bratishkaerik@getgoogleoff.me>2023-06-13 23:46:56 +0600
commitee821b2d7fa62310383bc22b527b1843aecc7e22 (patch)
treebdbedafc72f3e84e1433340866389f2f9eb8866c /lib/std
parent53fc991abde044054991d3fed405cb6733572941 (diff)
downloadzig-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>
Diffstat (limited to 'lib/std')
-rw-r--r--lib/std/fmt.zig6
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 => {},
}
}