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

Followup to cd7c870bd81391dd97c5c75eb3910382ba7280a1.
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
This commit is contained in:
Eric Joldasov 2023-06-05 00:01:28 +06:00
parent 53fc991abd
commit ee821b2d7f
No known key found for this signature in database
GPG Key ID: 5C9C69060686B588

View File

@ -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 => {},
}
}