master
1const std = @import("std");
2
3pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
4 _ = stack_trace;
5 if (std.mem.eql(u8, message, "'noreturn' function returned")) {
6 std.process.exit(0);
7 }
8 std.process.exit(1);
9}
10const T = struct {
11 export fn bar() void {
12 // ...
13 }
14};
15
16extern fn bar() noreturn;
17pub fn main() void {
18 _ = T.bar;
19 bar();
20}
21// run
22// backend=selfhosted,llvm
23// target=x86_64-linux,aarch64-linux