We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6c598e8 commit 530228dCopy full SHA for 530228d
lib/std/enums.zig
@@ -197,8 +197,7 @@ test "directEnumArrayDefault slice" {
197
try testing.expectEqualSlices(u8, "default", array[2]);
198
}
199
200
-/// Cast an enum literal, value, or string to the enum value of type E
201
-/// with the same name.
+/// Deprecated: Use @field(E, @tagName(tag)) or @field(E, string)
202
pub fn nameCast(comptime E: type, comptime value: anytype) E {
203
return comptime blk: {
204
const V = @TypeOf(value);
0 commit comments