Skip to content

Commit 175d018

Browse files
authored
langref: avoid use of the term "enum variant" in enums.zig (#13847)
1 parent 25d3713 commit 175d018

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/langref.html.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3585,7 +3585,7 @@ const Type = enum {
35853585
not_ok,
35863586
};
35873587

3588-
// Declare a specific instance of the enum variant.
3588+
// Declare a specific enum field.
35893589
const c = Type.ok;
35903590

35913591
// If you want access to the ordinal value of an enum, you
@@ -3634,13 +3634,13 @@ test "enum method" {
36343634
try expect(!p.isClubs());
36353635
}
36363636

3637-
// An enum variant of different types can be switched upon.
3637+
// An enum can be switched upon.
36383638
const Foo = enum {
36393639
string,
36403640
number,
36413641
none,
36423642
};
3643-
test "enum variant switch" {
3643+
test "enum switch" {
36443644
const p = Foo.number;
36453645
const what_is_it = switch (p) {
36463646
Foo.string => "this is a string",

0 commit comments

Comments
 (0)