authorgravatar for ashe@kivikakk.eeAsherah Connor <ashe@kivikakk.ee> 2021-01-15 14:21:39+11:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2021-01-29 20:46:39+02:00
loge8740a90b9c1ec2b7043dc5a0aed5474bb648c3d
treef7e0345bd1b9a086d910d4b61362a4f58ee87483
parent236db6232fa2beb97c47e3f1edcdb2a29e59d160

complete {Z} deprecation in std.fmt.formatIntValue

formatZigEscapes doesn't exist any more.

1 files changed, 1 insertions(+), 6 deletions(-)

lib/std/fmt.zig+1-6
......@@ -634,12 +634,7 @@ pub fn formatIntValue(
634634 @compileError("Cannot print integer that is larger than 8 bits as a ascii");
635635 }
636636 } else if (comptime std.mem.eql(u8, fmt, "Z")) {
637 if (@typeInfo(@TypeOf(int_value)).Int.bits <= 8) {
638 const c: u8 = int_value;
639 return formatZigEscapes(@as(*const [1]u8, &c), options, writer);
640 } else {
641 @compileError("Cannot escape character with more than 8 bits");
642 }
637 @compileError("specifier 'Z' has been deprecated, wrap your argument in std.zig.fmtEscapes instead");
643638 } else if (comptime std.mem.eql(u8, fmt, "u")) {
644639 if (@typeInfo(@TypeOf(int_value)).Int.bits <= 21) {
645640 return formatUnicodeCodepoint(@as(u21, int_value), options, writer);