| ... | @@ -476,7 +476,6 @@ pub fn hasUniqueRepresentation(comptime T: type) bool { | ... | @@ -476,7 +476,6 @@ pub fn hasUniqueRepresentation(comptime T: type) bool { |
| 476 | else => return false, // TODO can we know if it's true for some of these types ? | 476 | else => return false, // TODO can we know if it's true for some of these types ? |
| 477 | | 477 | |
| 478 | .AnyFrame, | 478 | .AnyFrame, |
| 479 | .Bool, | | |
| 480 | .BoundFn, | 479 | .BoundFn, |
| 481 | .Enum, | 480 | .Enum, |
| 482 | .ErrorSet, | 481 | .ErrorSet, |
| ... | @@ -484,6 +483,8 @@ pub fn hasUniqueRepresentation(comptime T: type) bool { | ... | @@ -484,6 +483,8 @@ pub fn hasUniqueRepresentation(comptime T: type) bool { |
| 484 | .Pointer, | 483 | .Pointer, |
| 485 | => return true, | 484 | => return true, |
| 486 | | 485 | |
| | 486 | .Bool => return false, |
| | 487 | |
| 487 | // The padding bits are undefined. | 488 | // The padding bits are undefined. |
| 488 | .Int => |info| return (info.bits % 8) == 0 and | 489 | .Int => |info| return (info.bits % 8) == 0 and |
| 489 | (info.bits == 0 or std.math.isPowerOfTwo(info.bits)), | 490 | (info.bits == 0 or std.math.isPowerOfTwo(info.bits)), |