authorgravatar for manlio.perillo@gmail.comManlio Perillo <manlio.perillo@gmail.com> 2022-12-13 21:02:17+01:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2022-12-13 15:02:17-05:00
log17d85a72c47e4a5964e41c533d84dd9bb11f1339
tree08287716f58114808be907421b60b11ec4f30209
parent89a9e927ad97bf1ef5f45a0a004dd2d46390e441
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

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 <andrew@ziglang.org>

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

doc/langref.html.in+3-2
......@@ -5472,7 +5472,8 @@ fn doAThing(str: []u8) !void {
54725472 <p>
54735473 Here we know for sure that "1234" will parse successfully. So we put the
54745474 {#syntax#}unreachable{#endsyntax#} value on the right hand side. {#syntax#}unreachable{#endsyntax#} generates
5475 a panic in Debug and ReleaseSafe modes and undefined behavior in ReleaseFast mode. So, while we're debugging the
5475 a panic in {#link|Debug#} and {#link|ReleaseSafe#} modes and undefined behavior in
5476 {#link|ReleaseFast#} and {#link|ReleaseSmall#} modes. So, while we're debugging the
54765477 application, if there <em>was</em> a surprise error here, the application would crash
54775478 appropriately.
54785479 </p>
......@@ -11891,7 +11892,7 @@ fn readU32Be() u32 {}
1189111892 Depending on the build mode, {#syntax#}unreachable{#endsyntax#} may emit a panic.
1189211893 <ul>
1189311894 <li>Emits a panic in {#syntax#}Debug{#endsyntax#} and {#syntax#}ReleaseSafe{#endsyntax#} mode, or when using <kbd>zig test</kbd>.</li>
11894 <li>Does not emit a panic in {#syntax#}ReleaseFast{#endsyntax#} mode, unless <kbd>zig test</kbd> is being used.</li>
11895 <li>Does not emit a panic in {#syntax#}ReleaseFast{#endsyntax#} and {#syntax#}ReleaseSmall{#endsyntax#} mode.</li>
1189511896 <li>See also {#link|unreachable#}</li>
1189611897 </ul>
1189711898 </td>