mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 14:23:09 +00:00
std.debug: remove errorReturnTraceHelper
This function doesn't do what it says; it's a nop.
This commit is contained in:
parent
f244c8891a
commit
6e7ae66871
@ -413,16 +413,9 @@ pub fn assertReadable(slice: []const volatile u8) void {
|
|||||||
for (slice) |*byte| _ = byte.*;
|
for (slice) |*byte| _ = byte.*;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// By including a call to this function, the caller gains an error return trace
|
|
||||||
/// secret parameter, making `@errorReturnTrace()` more useful. This is not
|
|
||||||
/// necessary if the function already contains a call to an errorable function
|
|
||||||
/// elsewhere.
|
|
||||||
pub fn errorReturnTraceHelper() anyerror!void {}
|
|
||||||
|
|
||||||
/// Equivalent to `@panic` but with a formatted message.
|
/// Equivalent to `@panic` but with a formatted message.
|
||||||
pub fn panic(comptime format: []const u8, args: anytype) noreturn {
|
pub fn panic(comptime format: []const u8, args: anytype) noreturn {
|
||||||
@branchHint(.cold);
|
@branchHint(.cold);
|
||||||
errorReturnTraceHelper() catch unreachable;
|
|
||||||
panicExtra(@errorReturnTrace(), @returnAddress(), format, args);
|
panicExtra(@errorReturnTrace(), @returnAddress(), format, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user