| ... | @@ -524,7 +524,7 @@ pub fn formatType( | ... | @@ -524,7 +524,7 @@ pub fn formatType( |
| 524 | if (actual_fmt.len == 0) | 524 | if (actual_fmt.len == 0) |
| 525 | @compileError("cannot format array ref without a specifier (i.e. {s} or {*})"); | 525 | @compileError("cannot format array ref without a specifier (i.e. {s} or {*})"); |
| 526 | if (info.child == u8) { | 526 | if (info.child == u8) { |
| 527 | if (comptime mem.indexOfScalar(u8, "sxXeEzZ", actual_fmt[0]) != null) { | 527 | if (comptime mem.indexOfScalar(u8, "sxXeE", actual_fmt[0]) != null) { |
| 528 | return formatText(value, actual_fmt, options, writer); | 528 | return formatText(value, actual_fmt, options, writer); |
| 529 | } | 529 | } |
| 530 | } | 530 | } |
| ... | @@ -542,7 +542,7 @@ pub fn formatType( | ... | @@ -542,7 +542,7 @@ pub fn formatType( |
| 542 | return formatType(mem.span(value), actual_fmt, options, writer, max_depth); | 542 | return formatType(mem.span(value), actual_fmt, options, writer, max_depth); |
| 543 | } | 543 | } |
| 544 | if (ptr_info.child == u8) { | 544 | if (ptr_info.child == u8) { |
| 545 | if (comptime mem.indexOfScalar(u8, "sxXeEzZ", actual_fmt[0]) != null) { | 545 | if (comptime mem.indexOfScalar(u8, "sxXeE", actual_fmt[0]) != null) { |
| 546 | return formatText(mem.span(value), actual_fmt, options, writer); | 546 | return formatText(mem.span(value), actual_fmt, options, writer); |
| 547 | } | 547 | } |
| 548 | } | 548 | } |
| ... | @@ -555,7 +555,7 @@ pub fn formatType( | ... | @@ -555,7 +555,7 @@ pub fn formatType( |
| 555 | return writer.writeAll("{ ... }"); | 555 | return writer.writeAll("{ ... }"); |
| 556 | } | 556 | } |
| 557 | if (ptr_info.child == u8) { | 557 | if (ptr_info.child == u8) { |
| 558 | if (comptime mem.indexOfScalar(u8, "sxXeEzZ", actual_fmt[0]) != null) { | 558 | if (comptime mem.indexOfScalar(u8, "sxXeE", actual_fmt[0]) != null) { |
| 559 | return formatText(value, actual_fmt, options, writer); | 559 | return formatText(value, actual_fmt, options, writer); |
| 560 | } | 560 | } |
| 561 | } | 561 | } |
| ... | @@ -576,7 +576,7 @@ pub fn formatType( | ... | @@ -576,7 +576,7 @@ pub fn formatType( |
| 576 | return writer.writeAll("{ ... }"); | 576 | return writer.writeAll("{ ... }"); |
| 577 | } | 577 | } |
| 578 | if (info.child == u8) { | 578 | if (info.child == u8) { |
| 579 | if (comptime mem.indexOfScalar(u8, "sxXeEzZ", actual_fmt[0]) != null) { | 579 | if (comptime mem.indexOfScalar(u8, "sxXeE", actual_fmt[0]) != null) { |
| 580 | return formatText(&value, actual_fmt, options, writer); | 580 | return formatText(&value, actual_fmt, options, writer); |
| 581 | } | 581 | } |
| 582 | } | 582 | } |
| ... | @@ -658,8 +658,6 @@ pub fn formatIntValue( | ... | @@ -658,8 +658,6 @@ pub fn formatIntValue( |
| 658 | } else { | 658 | } else { |
| 659 | @compileError("Cannot print integer that is larger than 8 bits as a ascii"); | 659 | @compileError("Cannot print integer that is larger than 8 bits as a ascii"); |
| 660 | } | 660 | } |
| 661 | } else if (comptime std.mem.eql(u8, fmt, "Z")) { | | |
| 662 | @compileError("specifier 'Z' has been deprecated, wrap your argument in std.zig.fmtEscapes instead"); | | |
| 663 | } else if (comptime std.mem.eql(u8, fmt, "u")) { | 661 | } else if (comptime std.mem.eql(u8, fmt, "u")) { |
| 664 | if (@typeInfo(@TypeOf(int_value)).Int.bits <= 21) { | 662 | if (@typeInfo(@TypeOf(int_value)).Int.bits <= 21) { |
| 665 | return formatUnicodeCodepoint(@as(u21, int_value), options, writer); | 663 | return formatUnicodeCodepoint(@as(u21, int_value), options, writer); |
| ... | @@ -735,10 +733,6 @@ pub fn formatText( | ... | @@ -735,10 +733,6 @@ pub fn formatText( |
| 735 | } | 733 | } |
| 736 | } | 734 | } |
| 737 | return; | 735 | return; |
| 738 | } else if (comptime std.mem.eql(u8, fmt, "z")) { | | |
| 739 | @compileError("specifier 'z' has been deprecated, wrap your argument in std.zig.fmtId instead"); | | |
| 740 | } else if (comptime std.mem.eql(u8, fmt, "Z")) { | | |
| 741 | @compileError("specifier 'Z' has been deprecated, wrap your argument in std.zig.fmtEscapes instead"); | | |
| 742 | } else { | 736 | } else { |
| 743 | @compileError("Unsupported format string '" ++ fmt ++ "' for type '" ++ @typeName(@TypeOf(value)) ++ "'"); | 737 | @compileError("Unsupported format string '" ++ fmt ++ "' for type '" ++ @typeName(@TypeOf(value)) ++ "'"); |
| 744 | } | 738 | } |