| ... | @@ -480,7 +480,6 @@ pub fn hasUniqueRepresentation(comptime T: type) bool { | ... | @@ -480,7 +480,6 @@ pub fn hasUniqueRepresentation(comptime T: type) bool { |
| 480 | .Enum, | 480 | .Enum, |
| 481 | .ErrorSet, | 481 | .ErrorSet, |
| 482 | .Fn, | 482 | .Fn, |
| 483 | .Pointer, | | |
| 484 | => return true, | 483 | => return true, |
| 485 | | 484 | |
| 486 | .Bool => return false, | 485 | .Bool => return false, |
| ... | @@ -489,6 +488,8 @@ pub fn hasUniqueRepresentation(comptime T: type) bool { | ... | @@ -489,6 +488,8 @@ pub fn hasUniqueRepresentation(comptime T: type) bool { |
| 489 | .Int => |info| return (info.bits % 8) == 0 and | 488 | .Int => |info| return (info.bits % 8) == 0 and |
| 490 | (info.bits == 0 or std.math.isPowerOfTwo(info.bits)), | 489 | (info.bits == 0 or std.math.isPowerOfTwo(info.bits)), |
| 491 | | 490 | |
| | 491 | .Pointer => |info| return info.size != .Slice, |
| | 492 | |
| 492 | .Array => |info| return comptime hasUniqueRepresentation(info.child), | 493 | .Array => |info| return comptime hasUniqueRepresentation(info.child), |
| 493 | | 494 | |
| 494 | .Struct => |info| { | 495 | .Struct => |info| { |