authorgravatar for r00ster91@protonmail.comr00ster <r00ster91@protonmail.com> 2021-12-29 21:11:12+01:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2022-01-01 10:29:36+02:00
logb100e2ec2a06268623b119baf584e059440cb8f0
tree861850048e7905316fee431b7a8afbdc26787c78
parent55709de185d973d9866aa761372817e0c3e8774d

std.fmt: improve `@compileError` message


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

lib/std/fmt.zig+1-1
...@@ -673,7 +673,7 @@ pub fn formatIntValue(...@@ -673,7 +673,7 @@ pub fn formatIntValue(
673 if (@typeInfo(@TypeOf(int_value)).Int.bits <= 8) {673 if (@typeInfo(@TypeOf(int_value)).Int.bits <= 8) {
674 return formatAsciiChar(@as(u8, int_value), options, writer);674 return formatAsciiChar(@as(u8, int_value), options, writer);
675 } else {675 } else {
676 @compileError("Cannot print integer that is larger than 8 bits as a ascii");676 @compileError("Cannot print integer that is larger than 8 bits as an ASCII character");
677 }677 }
678 } else if (comptime std.mem.eql(u8, fmt, "u")) {678 } else if (comptime std.mem.eql(u8, fmt, "u")) {
679 if (@typeInfo(@TypeOf(int_value)).Int.bits <= 21) {679 if (@typeInfo(@TypeOf(int_value)).Int.bits <= 21) {