| ... | @@ -413,16 +413,9 @@ pub fn assertReadable(slice: []const volatile u8) void { | ... | @@ -413,16 +413,9 @@ pub fn assertReadable(slice: []const volatile u8) void { |
| 413 | for (slice) |*byte| _ = byte.*; | 413 | for (slice) |*byte| _ = byte.*; |
| 414 | } | 414 | } |
| 415 | | 415 | |
| 416 | /// By including a call to this function, the caller gains an error return trace | | |
| 417 | /// secret parameter, making `@errorReturnTrace()` more useful. This is not | | |
| 418 | /// necessary if the function already contains a call to an errorable function | | |
| 419 | /// elsewhere. | | |
| 420 | pub fn errorReturnTraceHelper() anyerror!void {} | | |
| 421 | | | |
| 422 | /// Equivalent to `@panic` but with a formatted message. | 416 | /// Equivalent to `@panic` but with a formatted message. |
| 423 | pub fn panic(comptime format: []const u8, args: anytype) noreturn { | 417 | pub fn panic(comptime format: []const u8, args: anytype) noreturn { |
| 424 | @branchHint(.cold); | 418 | @branchHint(.cold); |
| 425 | errorReturnTraceHelper() catch unreachable; | | |
| 426 | panicExtra(@errorReturnTrace(), @returnAddress(), format, args); | 419 | panicExtra(@errorReturnTrace(), @returnAddress(), format, args); |
| 427 | } | 420 | } |
| 428 | | 421 | |