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:37:01+02:00
log327181a1a5d51769351296c164f3cc506812e12b
tree4cd015fdee9284e931fa17392eede1d08cfd47ae
parent84574e0e93e99b4f95a42328e570d93c6e665622
signature Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

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 {...@@ -84,7 +84,7 @@ pub fn invalidErrorCode() noreturn {
8484
85pub fn unexpectedErrorCode(err: anyerror) noreturn {85pub fn unexpectedErrorCode(err: anyerror) noreturn {
86 @branchHint(.cold);86 @branchHint(.cold);
87 _ = err;87 _ = &err;
88 call("unexpected error code", null);88 call("unexpected error code", null);
89}89}
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