From ceb0a632cfd6a4eada6bd27bf6a3754e95dcac86 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sun, 27 Nov 2022 01:07:35 -0700 Subject: std.mem.Allocator: allow shrink to fail closes #13535 --- src/Compilation.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Compilation.zig') diff --git a/src/Compilation.zig b/src/Compilation.zig index dcd9ca5cf6..48cf246287 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -5052,7 +5052,7 @@ fn parseLldStderr(comp: *Compilation, comptime prefix: []const u8, stderr: []con while (lines.next()) |line| { if (mem.startsWith(u8, line, prefix ++ ":")) { if (current_err) |err| { - err.context_lines = context_lines.toOwnedSlice(); + err.context_lines = try context_lines.toOwnedSlice(); } var split = std.mem.split(u8, line, "error: "); @@ -5078,7 +5078,7 @@ fn parseLldStderr(comp: *Compilation, comptime prefix: []const u8, stderr: []con } if (current_err) |err| { - err.context_lines = context_lines.toOwnedSlice(); + err.context_lines = try context_lines.toOwnedSlice(); } } -- cgit v1.2.3