diff options
| author | LemonBoy <thatlemon@gmail.com> | 2020-12-14 19:05:57 +0100 |
|---|---|---|
| committer | LemonBoy <thatlemon@gmail.com> | 2020-12-14 20:06:46 +0100 |
| commit | 9e5869262a5f07300b7f4ff65dfe60810f22afee (patch) | |
| tree | 14006ca3335e85402b9492a32e3f9d5247978337 /lib/std/meta | |
| parent | 44556bfebe8d06133c4dfc3cc2685ecb9d3babcd (diff) | |
| download | zig-9e5869262a5f07300b7f4ff65dfe60810f22afee.tar.gz zig-9e5869262a5f07300b7f4ff65dfe60810f22afee.zip | |
std: Bool has no definite representation too
The padding bits are undefined.
Diffstat (limited to 'lib/std/meta')
| -rw-r--r-- | lib/std/meta/trait.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/std/meta/trait.zig b/lib/std/meta/trait.zig index 1656a93798..ae3b77b8cc 100644 --- a/lib/std/meta/trait.zig +++ b/lib/std/meta/trait.zig @@ -476,7 +476,6 @@ pub fn hasUniqueRepresentation(comptime T: type) bool { else => return false, // TODO can we know if it's true for some of these types ? .AnyFrame, - .Bool, .BoundFn, .Enum, .ErrorSet, @@ -484,6 +483,8 @@ pub fn hasUniqueRepresentation(comptime T: type) bool { .Pointer, => return true, + .Bool => return false, + // The padding bits are undefined. .Int => |info| return (info.bits % 8) == 0 and (info.bits == 0 or std.math.isPowerOfTwo(info.bits)), |
