From 6f5a7b84571b65e921ae6d52bae5a5e4c7e25c4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Tempel?= Date: Sun, 12 Apr 2020 11:41:00 +0200 Subject: [PATCH] Update documentation of @panic The default panic handler implementation was moved to `builtin.zig`. --- doc/langref.html.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/langref.html.in b/doc/langref.html.in index bb824076d6..232cc035aa 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -7694,7 +7694,8 @@ test "call foo" {

Invokes the panic handler function. By default the panic handler function calls the public {#syntax#}panic{#endsyntax#} function exposed in the root source file, or - if there is not one specified, invokes the one provided in {#syntax#}std/special/panic.zig{#endsyntax#}. + if there is not one specified, the {#syntax#}std.builtin.default_panic{#endsyntax#} + function from {#syntax#}std/builtin.zig{#endsyntax#}.

Generally it is better to use {#syntax#}@import("std").debug.panic{#endsyntax#}. However, {#syntax#}@panic{#endsyntax#} can be useful for 2 scenarios: