From 17d85a72c47e4a5964e41c533d84dd9bb11f1339 Mon Sep 17 00:00:00 2001 From: Manlio Perillo Date: Tue, 13 Dec 2022 21:02:17 +0100 Subject: [PATCH] langref: add missing ReleaseSmall when describing unreachable (#13909) Add a missing ReleaseSmall when describing unreachable in the try section and the unreachable entry in the Keyword Reference section. Additionally, transform Debug, ReleaseSafe, ReleaseFast and ReleaseSmall into links in the try section. Co-authored-by: Andrew Kelley --- doc/langref.html.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/langref.html.in b/doc/langref.html.in index c163575cbd..a56d2fd086 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -5472,7 +5472,8 @@ fn doAThing(str: []u8) !void {

Here we know for sure that "1234" will parse successfully. So we put the {#syntax#}unreachable{#endsyntax#} value on the right hand side. {#syntax#}unreachable{#endsyntax#} generates - a panic in Debug and ReleaseSafe modes and undefined behavior in ReleaseFast mode. So, while we're debugging the + a panic in {#link|Debug#} and {#link|ReleaseSafe#} modes and undefined behavior in + {#link|ReleaseFast#} and {#link|ReleaseSmall#} modes. So, while we're debugging the application, if there was a surprise error here, the application would crash appropriately.

@@ -11891,7 +11892,7 @@ fn readU32Be() u32 {} Depending on the build mode, {#syntax#}unreachable{#endsyntax#} may emit a panic.