| ... | @@ -137,7 +137,7 @@ pub fn hash(hasher: anytype, key: anytype, comptime strat: HashStrategy) void { | ... | @@ -137,7 +137,7 @@ pub fn hash(hasher: anytype, key: anytype, comptime strat: HashStrategy) void { |
| 137 | } | 137 | } |
| 138 | }, | 138 | }, |
| 139 | | 139 | |
| 140 | .@"union" => |info| { | 140 | .@"union" => |info| blk: { |
| 141 | if (info.tag_type) |tag_type| { | 141 | if (info.tag_type) |tag_type| { |
| 142 | const tag = std.meta.activeTag(key); | 142 | const tag = std.meta.activeTag(key); |
| 143 | hash(hasher, tag, strat); | 143 | hash(hasher, tag, strat); |
| ... | @@ -146,9 +146,7 @@ pub fn hash(hasher: anytype, key: anytype, comptime strat: HashStrategy) void { | ... | @@ -146,9 +146,7 @@ pub fn hash(hasher: anytype, key: anytype, comptime strat: HashStrategy) void { |
| 146 | if (field.type != void) { | 146 | if (field.type != void) { |
| 147 | hash(hasher, @field(key, field.name), strat); | 147 | hash(hasher, @field(key, field.name), strat); |
| 148 | } | 148 | } |
| 149 | // TODO use a labelled break when it does not crash the compiler. cf #2908 | 149 | break :blk; |
| 150 | // break :blk; | | |
| 151 | return; | | |
| 152 | } | 150 | } |
| 153 | } | 151 | } |
| 154 | unreachable; | 152 | unreachable; |