aboutsummaryrefslogtreecommitdiff
path: root/lib/std/fmt.zig
diff options
context:
space:
mode:
authorAlexandros Naskos <alex_naskos@hotmail.com>2020-10-02 00:39:19 +0300
committerGitHub <noreply@github.com>2020-10-02 00:39:19 +0300
commita4fe438d3940d0beff16c939e991fdff24eb6ba2 (patch)
treeb00c71296e76654bfb85e956490a8b1fcb36ead2 /lib/std/fmt.zig
parent49c0cd6e8ef2efcd2c7edc8b41fc8c0a10c8b350 (diff)
downloadzig-a4fe438d3940d0beff16c939e991fdff24eb6ba2.tar.gz
zig-a4fe438d3940d0beff16c939e991fdff24eb6ba2.zip
std.fmt.comptimePrint: bufPrint cannot return an error
Diffstat (limited to 'lib/std/fmt.zig')
-rw-r--r--lib/std/fmt.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/fmt.zig b/lib/std/fmt.zig
index 0bc5093fb9..ab2cc1577d 100644
--- a/lib/std/fmt.zig
+++ b/lib/std/fmt.zig
@@ -1183,7 +1183,7 @@ fn bufPrintIntToSlice(buf: []u8, value: anytype, base: u8, uppercase: bool, opti
pub fn comptimePrint(comptime fmt: []const u8, args: anytype) *const [count(fmt, args)]u8 {
comptime var buf: [count(fmt, args)]u8 = undefined;
- _ = bufPrint(&buf, fmt, args) catch |err| @compileError(err);
+ _ = bufPrint(&buf, fmt, args) catch unreachable;
return &buf;
}