authorgravatar for hi@whatisaph.onewhatisaphone <hi@whatisaph.one> 2026-09-20 15:04:44-04:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-03 19:36:46+02:00
log996321250d9a9438fc65fcfe64a0d6ada04e50a0
tree363e0577c74fd6218aec86c90c6015e3432df9b9
parentb5908c03d6e09494b38ff596b39fdf0eed7258a3

Fix simple_panic


3 files changed, 19 insertions(+), 1 deletions(-)

lib/std/debug/simple_panic.zig+1-1
......@@ -84,7 +84,7 @@ pub fn invalidErrorCode() noreturn {
8484
8585pub fn unexpectedErrorCode(err: anyerror) noreturn {
8686 @branchHint(.cold);
87 _ = err;
87 _ = &err;
8888 call("unexpected error code", null);
8989}
9090
test/cases/std_debug_no_panic.zig created+9
......@@ -0,0 +1,9 @@
1const std = @import("std");
2
3pub const panic = std.debug.no_panic;
4
5pub fn main() void {
6 @panic("this makes the compiler reference the panic namespace");
7}
8
9// compile
test/cases/std_debug_simple_panic.zig created+9
......@@ -0,0 +1,9 @@
1const std = @import("std");
2
3pub const panic = std.debug.simple_panic;
4
5pub fn main() void {
6 @panic("this makes the compiler reference the panic namespace");
7}
8
9// compile