zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit e8740a90b9c1ec2b7043dc5a0aed5474bb648c3d (tree)
parent 236db6232fa2beb97c47e3f1edcdb2a29e59d160
Author: Asherah Connor <ashe@kivikakk.ee>
Date:   Fri, 15 Jan 2021 14:21:39 +1100

complete {Z} deprecation in std.fmt.formatIntValue

formatZigEscapes doesn't exist any more.

Diffstat:
Mlib/std/fmt.zig | 7+------
1 file changed, 1 insertion(+), 6 deletions(-)

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