diff options
| author | Tadeo Kondrak <me@tadeo.ca> | 2021-01-11 11:19:24 -0700 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2021-01-30 22:26:44 +0200 |
| commit | 0b5f3c2ef96df02341cdf54f6eefb3cdb88781d8 (patch) | |
| tree | 1a9a37f1a5fc96b56044f74c186101d5ac862654 /doc | |
| parent | 1637d8ac80b46599e276eb767208f54f0a30ccf0 (diff) | |
| download | zig-0b5f3c2ef96df02341cdf54f6eefb3cdb88781d8.tar.gz zig-0b5f3c2ef96df02341cdf54f6eefb3cdb88781d8.zip | |
Replace @TagType uses, mostly with std.meta.Tag
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/langref.html.in | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/langref.html.in b/doc/langref.html.in index 3af4d7d2b1..f75fc351d9 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -2909,15 +2909,15 @@ test "enum variant switch" { expect(mem.eql(u8, what_is_it, "this is a number")); } -// @TagType can be used to access the integer tag type of an enum. +// @typeInfo can be used to access the integer tag type of an enum. const Small = enum { one, two, three, four, }; -test "@TagType" { - expect(@TagType(Small) == u2); +test "std.meta.Tag" { + expect(@typeInfo(Small).Enum.tag_type == u2); } // @typeInfo tells us the field count and the fields names: |
