Skip to content

Commit 9a2f17f

Browse files
authored
Docs: clarify unreachable for ReleaseSmall
1 parent 779c2da commit 9a2f17f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

doc/langref.html.in

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4903,13 +4903,12 @@ test "errdefer unwinding" {
49034903
{#header_close#}
49044904
{#header_open|unreachable#}
49054905
<p>
4906-
In {#syntax#}Debug{#endsyntax#} and {#syntax#}ReleaseSafe{#endsyntax#} mode, and when using <kbd>zig test</kbd>,
4906+
In {#link|Debug#} and {#link|ReleaseSafe#} mode
49074907
{#syntax#}unreachable{#endsyntax#} emits a call to {#syntax#}panic{#endsyntax#} with the message <code>reached unreachable code</code>.
49084908
</p>
49094909
<p>
4910-
In {#syntax#}ReleaseFast{#endsyntax#} mode, the optimizer uses the assumption that {#syntax#}unreachable{#endsyntax#} code
4911-
will never be hit to perform optimizations. However, <kbd>zig test</kbd> even in {#syntax#}ReleaseFast{#endsyntax#} mode
4912-
still emits {#syntax#}unreachable{#endsyntax#} as calls to {#syntax#}panic{#endsyntax#}.
4910+
In {#link|ReleaseFast#} and {#link|ReleaseSmall#} mode, the optimizer uses the assumption that {#syntax#}unreachable{#endsyntax#} code
4911+
will never be hit to perform optimizations.
49134912
</p>
49144913
{#header_open|Basics#}
49154914
{#code_begin|test|test_unreachable#}

0 commit comments

Comments
 (0)