diff options
| author | r00ster91 <r00ster91@proton.me> | 2022-12-13 22:30:06 +0100 |
|---|---|---|
| committer | r00ster91 <r00ster91@proton.me> | 2022-12-17 14:11:33 +0100 |
| commit | aac2d6b56f32134ea32fb3d984e3fcdfddd8aaf6 (patch) | |
| tree | 941528727d4d0a5b92f58c0b862f0d5f372b89e0 /lib/std/hash | |
| parent | 7350ea3e2da4d4e6ef5092cd9f0832beef0291d5 (diff) | |
| download | zig-aac2d6b56f32134ea32fb3d984e3fcdfddd8aaf6.tar.gz zig-aac2d6b56f32134ea32fb3d984e3fcdfddd8aaf6.zip | |
std.builtin: rename Type.UnionField and Type.StructField's field_type to type
Diffstat (limited to 'lib/std/hash')
| -rw-r--r-- | lib/std/hash/auto_hash.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/std/hash/auto_hash.zig b/lib/std/hash/auto_hash.zig index aac4b0feaf..d4640262f2 100644 --- a/lib/std/hash/auto_hash.zig +++ b/lib/std/hash/auto_hash.zig @@ -134,7 +134,7 @@ pub fn hash(hasher: anytype, key: anytype, comptime strat: HashStrategy) void { hash(hasher, tag, strat); inline for (info.fields) |field| { if (@field(tag_type, field.name) == tag) { - if (field.field_type != void) { + if (field.type != void) { hash(hasher, @field(key, field.name), strat); } // TODO use a labelled break when it does not crash the compiler. cf #2908 @@ -163,14 +163,14 @@ fn typeContainsSlice(comptime K: type) bool { } if (meta.trait.is(.Struct)(K)) { inline for (@typeInfo(K).Struct.fields) |field| { - if (typeContainsSlice(field.field_type)) { + if (typeContainsSlice(field.type)) { return true; } } } if (meta.trait.is(.Union)(K)) { inline for (@typeInfo(K).Union.fields) |field| { - if (typeContainsSlice(field.field_type)) { + if (typeContainsSlice(field.type)) { return true; } } |
