Skip to content

Commit fcef728

Browse files
perilloVexu
authored andcommitted
langref: make "Type Coercion" subsections more consistent
In the "Type Coercion" section, rename: - Coercion Float to Int => Float to Int - unions and enums => Unions and Enums - tuples to arrays => Tuples to Arrays
1 parent 21d9f0c commit fcef728

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/langref.html.in

+4-4
Original file line numberDiff line numberDiff line change
@@ -3839,7 +3839,7 @@ test "simple union" {
38393839
<p>Unions can be declared with an enum tag type.
38403840
This turns the union into a <em>tagged</em> union, which makes it eligible
38413841
to use with {#link|switch#} expressions.
3842-
Tagged unions coerce to their tag type: {#link|Type Coercion: unions and enums#}.
3842+
Tagged unions coerce to their tag type: {#link|Type Coercion: Unions and Enums#}.
38433843
</p>
38443844
{#code_begin|test|test_tagged_union#}
38453845
const std = @import("std");
@@ -6275,7 +6275,7 @@ test "float widening" {
62756275
}
62766276
{#code_end#}
62776277
{#header_close#}
6278-
{#header_open|Type Coercion: Coercion Float to Int#}
6278+
{#header_open|Type Coercion: Float to Int#}
62796279
<p>
62806280
A compiler error is appropriate because this ambiguous expression leaves the compiler
62816281
two choices about the coercion.
@@ -6427,7 +6427,7 @@ test "coercing large integer type to smaller one when value is comptime-known to
64276427
}
64286428
{#code_end#}
64296429
{#header_close#}
6430-
{#header_open|Type Coercion: unions and enums#}
6430+
{#header_open|Type Coercion: Unions and Enums#}
64316431
<p>Tagged unions can be coerced to enums, and enums can be coerced to tagged unions
64326432
when they are {#link|comptime#}-known to be a field of the union that has only one possible value, such as
64336433
{#link|void#}:
@@ -6487,7 +6487,7 @@ test "coercion between unions and enums" {
64876487
<p>{#link|undefined#} can be coerced to any type.</p>
64886488
{#header_close#}
64896489

6490-
{#header_open|Type Coercion: tuples to arrays#}
6490+
{#header_open|Type Coercion: Tuples to Arrays#}
64916491
<p>{#link|Tuples#} can be coerced to arrays, if all of the fields have the same type.</p>
64926492
{#code_begin|test|test_coerce_tuples_arrays#}
64936493
const std = @import("std");

0 commit comments

Comments
 (0)