authorgravatar for 75577902+AndrewKraevskii@users.noreply.github.comАндрей Краевский <75577902+AndrewKraevskii@users.noreply.github.com> 2025-04-16 00:36:43+03:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2025-04-15 23:36:43+02:00
log530228d9531e8d1dcf7e8ed88e68403e65bcf6bb
treeadba4453c823e623749efbd0b4920f67e973b6e4
parent6c598e8341c202a61dc24678f4450fd5af961b4e
signaturebadge-check Signed by PGP key B5690EEEBB952194

Deprecate std.enums.nameCast.


1 files changed, 1 insertions(+), 2 deletions(-)

lib/std/enums.zig+1-2
......@@ -197,8 +197,7 @@ test "directEnumArrayDefault slice" {
197197 try testing.expectEqualSlices(u8, "default", array[2]);
198198}
199199
200/// Cast an enum literal, value, or string to the enum value of type E
201/// with the same name.
200/// Deprecated: Use @field(E, @tagName(tag)) or @field(E, string)
202201pub fn nameCast(comptime E: type, comptime value: anytype) E {
203202 return comptime blk: {
204203 const V = @TypeOf(value);