diff --git a/doc/langref.html.in b/doc/langref.html.in index a8af959615..254f119d3d 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -1422,7 +1422,8 @@ fn foo() i32 { {#header_open|Thread Local Variables#}

A variable may be specified to be a thread-local variable using the - {#syntax#}threadlocal{#endsyntax#} keyword:

+ {#syntax#}threadlocal{#endsyntax#} keyword, + which makes each thread work with a separate instance of the variable:

{#code_begin|test|test_thread_local_variables#} const std = @import("std"); const assert = std.debug.assert; @@ -4278,7 +4279,7 @@ const expectError = std.testing.expectError; fn isFieldOptional(comptime T: type, field_index: usize) !bool { const fields = @typeInfo(T).Struct.fields; return switch (field_index) { - // This prong is analyzed `fields.len - 1` times with `idx` being an + // This prong is analyzed `fields.len - 1` times with `idx` being a // unique comptime-known value each time. inline 0...fields.len - 1 => |idx| @typeInfo(fields[idx].type) == .Optional, else => return error.IndexOutOfBounds, @@ -8040,7 +8041,7 @@ pub const CallModifier = enum {

{#syntax#}@TypeOf(operand){#endsyntax#} must be an integer type or an integer vector type.

{#syntax#}operand{#endsyntax#} may be an {#link|integer|Integers#} or {#link|vector|Vectors#}.

- This function counts the number of most-significant (leading in a big-Endian sense) zeroes in an integer. + Counts the number of most-significant (leading in a big-endian sense) zeroes in an integer - "count leading zeroes".

If {#syntax#}operand{#endsyntax#} is a {#link|comptime#}-known integer, @@ -8190,7 +8191,7 @@ test "main" {

{#syntax#}@TypeOf(operand){#endsyntax#} must be an integer type or an integer vector type.

{#syntax#}operand{#endsyntax#} may be an {#link|integer|Integers#} or {#link|vector|Vectors#}.

- This function counts the number of least-significant (trailing in a big-Endian sense) zeroes in an integer. + Counts the number of least-significant (trailing in a big-endian sense) zeroes in an integer - "count trailing zeroes".

If {#syntax#}operand{#endsyntax#} is a {#link|comptime#}-known integer, @@ -8576,11 +8577,11 @@ test "@hasDecl" {

{#see_also|Compile Variables|@embedFile#} @@ -8803,7 +8804,9 @@ test "@wasmMemoryGrow" {
{#syntax#}@popCount(operand: anytype) anytype{#endsyntax#}

{#syntax#}@TypeOf(operand){#endsyntax#} must be an integer type.

{#syntax#}operand{#endsyntax#} may be an {#link|integer|Integers#} or {#link|vector|Vectors#}.

-

Counts the number of bits set in an integer.

+

+ Counts the number of bits set in an integer - "population count". +

If {#syntax#}operand{#endsyntax#} is a {#link|comptime#}-known integer, the return type is {#syntax#}comptime_int{#endsyntax#}. @@ -8835,6 +8838,8 @@ test "@wasmMemoryGrow" { pub const PrefetchOptions = struct { /// Whether the prefetch should prepare for a read or a write. rw: Rw = .read, + /// The data's locality in an inclusive range from 0 to 3. + /// /// 0 means no temporal locality. That is, the data can be immediately /// dropped from the cache after it is accessed. /// @@ -8844,12 +8849,12 @@ pub const PrefetchOptions = struct { /// The cache that the prefetch should be preformed on. cache: Cache = .data, - pub const Rw = enum { + pub const Rw = enum(u1) { read, write, }; - pub const Cache = enum { + pub const Cache = enum(u1) { instruction, data, }; @@ -10971,7 +10976,7 @@ pub const MAKELOCAL = @compileError("unable to translate C expr: unexpected toke

{#syntax#}[*c]T{#endsyntax#} - C pointer.