authorgravatar for 72133097+gettsu@users.noreply.github.comgettsu <72133097+gettsu@users.noreply.github.com> 2022-12-13 13:49:42+09:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2022-12-12 23:49:42-05:00
log175d018512c6fd04833a242413ff21e9551b23a2
tree34cf6bd9ea26abee42e8bb1fdcbeb604d0304b4f
parent25d3713b07a100d8fdb349317db97fd9d0c1e366
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

langref: avoid use of the term "enum variant" in enums.zig (#13847)


1 files changed, 3 insertions(+), 3 deletions(-)

doc/langref.html.in+3-3
......@@ -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.
35893589const 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.
36383638const Foo = enum {
36393639 string,
36403640 number,
36413641 none,
36423642};
3643test "enum variant switch" {
3643test "enum switch" {
36443644 const p = Foo.number;
36453645 const what_is_it = switch (p) {
36463646 Foo.string => "this is a string",