std.mem.Allocator: allow shrink to fail

closes #13535
This commit is contained in:
Andrew Kelley
2022-11-27 01:07:35 -07:00
parent deda6b5146
commit ceb0a632cf
57 changed files with 950 additions and 1279 deletions

View File

@@ -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();
}
}