diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-11-30 01:44:34 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-30 01:44:34 -0500 |
| commit | e35f297aeb993ec956ae80379ddf7f86069e109b (patch) | |
| tree | 45cbb5b3ebbe23a46e27b04aa5898a6c00ec4a61 /src/Compilation.zig | |
| parent | deda6b514691c3a7ffc7931469886d0e7be2f67e (diff) | |
| parent | f4666678886c2a7a993ad30b63de4ff25594085a (diff) | |
| download | zig-e35f297aeb993ec956ae80379ddf7f86069e109b.tar.gz zig-e35f297aeb993ec956ae80379ddf7f86069e109b.zip | |
Merge pull request #13666 from ziglang/allocator-interface
std.mem.Allocator: allow shrink to fail
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 4 |
1 files changed, 2 insertions, 2 deletions
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(); } } |
