| ... | @@ -197,8 +197,7 @@ test "directEnumArrayDefault slice" { | ... | @@ -197,8 +197,7 @@ test "directEnumArrayDefault slice" { |
| 197 | try testing.expectEqualSlices(u8, "default", array[2]); | 197 | try testing.expectEqualSlices(u8, "default", array[2]); |
| 198 | } | 198 | } |
| 199 | | 199 | |
| 200 | /// Cast an enum literal, value, or string to the enum value of type E | 200 | /// Deprecated: Use @field(E, @tagName(tag)) or @field(E, string) |
| 201 | /// with the same name. | | |
| 202 | pub fn nameCast(comptime E: type, comptime value: anytype) E { | 201 | pub fn nameCast(comptime E: type, comptime value: anytype) E { |
| 203 | return comptime blk: { | 202 | return comptime blk: { |
| 204 | const V = @TypeOf(value); | 203 | const V = @TypeOf(value); |