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 /lib/std/json.zig | |
| parent | 1637d8ac80b46599e276eb767208f54f0a30ccf0 (diff) | |
| download | zig-0b5f3c2ef96df02341cdf54f6eefb3cdb88781d8.tar.gz zig-0b5f3c2ef96df02341cdf54f6eefb3cdb88781d8.zip | |
Replace @TagType uses, mostly with std.meta.Tag
Diffstat (limited to 'lib/std/json.zig')
| -rw-r--r-- | lib/std/json.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/json.zig b/lib/std/json.zig index a97044a4d8..dc23155a5e 100644 --- a/lib/std/json.zig +++ b/lib/std/json.zig @@ -246,7 +246,7 @@ pub const StreamingParser = struct { // Only call this function to generate array/object final state. pub fn fromInt(x: anytype) State { debug.assert(x == 0 or x == 1); - const T = @TagType(State); + const T = std.meta.Tag(State); return @intToEnum(State, @intCast(T, x)); } }; @@ -1782,7 +1782,7 @@ test "parseFree descends into tagged union" { }; // use a string with unicode escape so we know result can't be a reference to global constant const r = try parse(T, &TokenStream.init("\"with\\u0105unicode\""), options); - testing.expectEqual(@TagType(T).string, @as(@TagType(T), r)); + testing.expectEqual(std.meta.Tag(T).string, @as(std.meta.Tag(T), r)); testing.expectEqualSlices(u8, "withÄ…unicode", r.string); testing.expectEqual(@as(usize, 0), fail_alloc.deallocations); parseFree(T, r, options); |
