@@ -7814,7 +7814,7 @@ comptime {
7814
7814
{#header_close#}
7815
7815
7816
7816
{#header_open|@breakpoint#}
7817
- <pre>{#syntax#}@breakpoint(){#endsyntax#}</pre>
7817
+ <pre>{#syntax#}@breakpoint() void {#endsyntax#}</pre>
7818
7818
<p>
7819
7819
This function inserts a platform-specific debug trap instruction which causes
7820
7820
debuggers to break there.
@@ -7933,7 +7933,7 @@ pub const CallModifier = enum {
7933
7933
{#header_close#}
7934
7934
7935
7935
{#header_open|@cDefine#}
7936
- <pre>{#syntax#}@cDefine(comptime name: []u8, value){#endsyntax#}</pre>
7936
+ <pre>{#syntax#}@cDefine(comptime name: []u8, value) void {#endsyntax#}</pre>
7937
7937
<p>
7938
7938
This function can only occur inside {#syntax#}@cImport{#endsyntax#}.
7939
7939
</p>
@@ -7977,7 +7977,7 @@ pub const CallModifier = enum {
7977
7977
{#see_also|Import from C Header File|@cInclude|@cDefine|@cUndef#}
7978
7978
{#header_close#}
7979
7979
{#header_open|@cInclude#}
7980
- <pre>{#syntax#}@cInclude(comptime path: []u8){#endsyntax#}</pre>
7980
+ <pre>{#syntax#}@cInclude(comptime path: []u8) void {#endsyntax#}</pre>
7981
7981
<p>
7982
7982
This function can only occur inside {#syntax#}@cImport{#endsyntax#}.
7983
7983
</p>
@@ -7989,7 +7989,7 @@ pub const CallModifier = enum {
7989
7989
{#header_close#}
7990
7990
7991
7991
{#header_open|@clz#}
7992
- <pre>{#syntax#}@clz(operand: anytype){#endsyntax#}</pre>
7992
+ <pre>{#syntax#}@clz(operand: anytype) anytype {#endsyntax#}</pre>
7993
7993
<p>{#syntax#}@TypeOf(operand){#endsyntax#} must be an integer type or an integer vector type.</p>
7994
7994
<p>{#syntax#}operand{#endsyntax#} may be an {#link|integer|Integers#} or {#link|vector|Vectors#}.</p>
7995
7995
<p>
@@ -8068,7 +8068,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
8068
8068
{#header_close#}
8069
8069
8070
8070
{#header_open|@compileError#}
8071
- <pre>{#syntax#}@compileError(comptime msg: []u8){#endsyntax#}</pre>
8071
+ <pre>{#syntax#}@compileError(comptime msg: []u8) noreturn {#endsyntax#}</pre>
8072
8072
<p>
8073
8073
This function, when semantically analyzed, causes a compile error with the
8074
8074
message {#syntax#}msg{#endsyntax#}.
@@ -8081,7 +8081,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
8081
8081
{#header_close#}
8082
8082
8083
8083
{#header_open|@compileLog#}
8084
- <pre>{#syntax#}@compileLog(args: ...){#endsyntax#}</pre>
8084
+ <pre>{#syntax#}@compileLog(args: ...) void {#endsyntax#}</pre>
8085
8085
<p>
8086
8086
This function prints the arguments passed to it at compile-time.
8087
8087
</p>
@@ -8139,7 +8139,7 @@ test "main" {
8139
8139
{#header_close#}
8140
8140
8141
8141
{#header_open|@ctz#}
8142
- <pre>{#syntax#}@ctz(operand: anytype){#endsyntax#}</pre>
8142
+ <pre>{#syntax#}@ctz(operand: anytype) anytype {#endsyntax#}</pre>
8143
8143
<p>{#syntax#}@TypeOf(operand){#endsyntax#} must be an integer type or an integer vector type.</p>
8144
8144
<p>{#syntax#}operand{#endsyntax#} may be an {#link|integer|Integers#} or {#link|vector|Vectors#}.</p>
8145
8145
<p>
@@ -8159,7 +8159,7 @@ test "main" {
8159
8159
{#header_close#}
8160
8160
8161
8161
{#header_open|@cUndef#}
8162
- <pre>{#syntax#}@cUndef(comptime name: []u8){#endsyntax#}</pre>
8162
+ <pre>{#syntax#}@cUndef(comptime name: []u8) void {#endsyntax#}</pre>
8163
8163
<p>
8164
8164
This function can only occur inside {#syntax#}@cImport{#endsyntax#}.
8165
8165
</p>
@@ -8370,7 +8370,7 @@ export fn @"A function name that is a complete sentence."() void {}
8370
8370
{#header_close#}
8371
8371
8372
8372
{#header_open|@fence#}
8373
- <pre>{#syntax#}@fence(order: AtomicOrder){#endsyntax#}</pre>
8373
+ <pre>{#syntax#}@fence(order: AtomicOrder) void {#endsyntax#}</pre>
8374
8374
<p>
8375
8375
The {#syntax#}fence{#endsyntax#} function is used to introduce happens-before edges between operations.
8376
8376
</p>
@@ -8622,7 +8622,7 @@ test "integer cast panic" {
8622
8622
{#header_close#}
8623
8623
8624
8624
{#header_open|@memcpy#}
8625
- <pre>{#syntax#}@memcpy(noalias dest: [*]u8, noalias source: [*]const u8, byte_count: usize){#endsyntax#}</pre>
8625
+ <pre>{#syntax#}@memcpy(noalias dest: [*]u8, noalias source: [*]const u8, byte_count: usize) void {#endsyntax#}</pre>
8626
8626
<p>
8627
8627
This function copies bytes from one region of memory to another. {#syntax#}dest{#endsyntax#} and
8628
8628
{#syntax#}source{#endsyntax#} are both pointers and must not overlap.
@@ -8641,7 +8641,7 @@ mem.copy(u8, dest[0..byte_count], source[0..byte_count]);{#endsyntax#}</pre>
8641
8641
{#header_close#}
8642
8642
8643
8643
{#header_open|@memset#}
8644
- <pre>{#syntax#}@memset(dest: [*]u8, c: u8, byte_count: usize){#endsyntax#}</pre>
8644
+ <pre>{#syntax#}@memset(dest: [*]u8, c: u8, byte_count: usize) void {#endsyntax#}</pre>
8645
8645
<p>
8646
8646
This function sets a region of memory to {#syntax#}c{#endsyntax#}. {#syntax#}dest{#endsyntax#} is a pointer.
8647
8647
</p>
@@ -8753,7 +8753,7 @@ test "@wasmMemoryGrow" {
8753
8753
{#header_close#}
8754
8754
8755
8755
{#header_open|@popCount#}
8756
- <pre>{#syntax#}@popCount(operand: anytype){#endsyntax#}</pre>
8756
+ <pre>{#syntax#}@popCount(operand: anytype) anytype {#endsyntax#}</pre>
8757
8757
<p>{#syntax#}@TypeOf(operand){#endsyntax#} must be an integer type.</p>
8758
8758
<p>{#syntax#}operand{#endsyntax#} may be an {#link|integer|Integers#} or {#link|vector|Vectors#}.</p>
8759
8759
<p>Counts the number of bits set in an integer.</p>
@@ -8767,7 +8767,7 @@ test "@wasmMemoryGrow" {
8767
8767
{#header_close#}
8768
8768
8769
8769
{#header_open|@prefetch#}
8770
- <pre>{#syntax#}@prefetch(ptr: anytype, comptime options: std.builtin.PrefetchOptions){#endsyntax#}</pre>
8770
+ <pre>{#syntax#}@prefetch(ptr: anytype, comptime options: std.builtin.PrefetchOptions) void {#endsyntax#}</pre>
8771
8771
<p>
8772
8772
This builtin tells the compiler to emit a prefetch instruction if supported by the
8773
8773
target CPU. If the target CPU does not support the requested prefetch instruction,
@@ -8881,21 +8881,21 @@ pub const PrefetchOptions = struct {
8881
8881
{#header_close#}
8882
8882
8883
8883
{#header_open|@setAlignStack#}
8884
- <pre>{#syntax#}@setAlignStack(comptime alignment: u29){#endsyntax#}</pre>
8884
+ <pre>{#syntax#}@setAlignStack(comptime alignment: u29) void {#endsyntax#}</pre>
8885
8885
<p>
8886
8886
Ensures that a function will have a stack alignment of at least {#syntax#}alignment{#endsyntax#} bytes.
8887
8887
</p>
8888
8888
{#header_close#}
8889
8889
8890
8890
{#header_open|@setCold#}
8891
- <pre>{#syntax#}@setCold(comptime is_cold: bool){#endsyntax#}</pre>
8891
+ <pre>{#syntax#}@setCold(comptime is_cold: bool) void {#endsyntax#}</pre>
8892
8892
<p>
8893
8893
Tells the optimizer that a function is rarely called.
8894
8894
</p>
8895
8895
{#header_close#}
8896
8896
8897
8897
{#header_open|@setEvalBranchQuota#}
8898
- <pre>{#syntax#}@setEvalBranchQuota(comptime new_quota: u32){#endsyntax#}</pre>
8898
+ <pre>{#syntax#}@setEvalBranchQuota(comptime new_quota: u32) void {#endsyntax#}</pre>
8899
8899
<p>
8900
8900
Changes the maximum number of backwards branches that compile-time code
8901
8901
execution can use before giving up and making a compile error.
@@ -8930,7 +8930,7 @@ test "foo" {
8930
8930
{#header_close#}
8931
8931
8932
8932
{#header_open|@setFloatMode#}
8933
- <pre>{#syntax#}@setFloatMode(comptime mode: @import("std").builtin.FloatMode){#endsyntax#}</pre>
8933
+ <pre>{#syntax#}@setFloatMode(comptime mode: @import("std").builtin.FloatMode) void {#endsyntax#}</pre>
8934
8934
<p>
8935
8935
Sets the floating point mode of the current scope. Possible values are:
8936
8936
</p>
0 commit comments