std.fmt: improve @compileError message

This commit is contained in:
r00ster
2021-12-29 21:11:12 +01:00
committed by Andrew Kelley
parent 47e3deeeaa
commit 419499b252

View File

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