mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-06-02 06:16:53 +03:00
compiler,tests,tools: remove uses of capturing errdefer
In preparation for its removal, as accepted in https://github.com/ziglang/zig/issues/23734.
This commit is contained in:
@@ -11222,14 +11222,16 @@ fn initValueAdvanced(
|
||||
};
|
||||
return @enumFromInt(isel.values.items.len);
|
||||
}
|
||||
pub fn dumpValues(isel: *Select, which: enum { only_referenced, all }) void {
|
||||
const WhichValues = enum { only_referenced, all };
|
||||
pub fn dumpValues(isel: *Select, which: WhichValues) void {
|
||||
dumpValuesInner(isel, which) catch |err| @panic(@errorName(err));
|
||||
}
|
||||
fn dumpValuesInner(isel: *Select, which: WhichValues) !void {
|
||||
const zcu = isel.pt.zcu;
|
||||
const gpa = zcu.gpa;
|
||||
const ip = &zcu.intern_pool;
|
||||
const nav = ip.getNav(isel.nav_index);
|
||||
|
||||
errdefer |err| @panic(@errorName(err));
|
||||
|
||||
const locked_stderr = std.debug.lockStderr(&.{});
|
||||
defer std.debug.unlockStderr();
|
||||
const stderr = &locked_stderr.file_writer.interface;
|
||||
|
||||
Reference in New Issue
Block a user