aboutsummaryrefslogtreecommitdiff
path: root/lib/std/math.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-04-24 10:44:41 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-04-24 10:44:41 -0700
commite86cee258cb0eefca14a94f6b3abb39e8a5f2ef9 (patch)
tree6d9aa3b21685b1581787246f953db94cdb486693 /lib/std/math.zig
parent224fbb23c44628b215662c6199dff11cc2851f04 (diff)
parent8530b6b7242ebf43b5cb4ae3a2644593f4961a5e (diff)
downloadzig-e86cee258cb0eefca14a94f6b3abb39e8a5f2ef9.tar.gz
zig-e86cee258cb0eefca14a94f6b3abb39e8a5f2ef9.zip
Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgen
In particular I wanted the change that makes `suspend;` illegal in the parser.
Diffstat (limited to 'lib/std/math.zig')
-rw-r--r--lib/std/math.zig9
1 files changed, 0 insertions, 9 deletions
diff --git a/lib/std/math.zig b/lib/std/math.zig
index cb6f3cec1f..f6dfc6ec78 100644
--- a/lib/std/math.zig
+++ b/lib/std/math.zig
@@ -1349,15 +1349,6 @@ pub fn boolMask(comptime MaskInt: type, value: bool) callconv(.Inline) MaskInt {
return @bitCast(i1, @as(u1, @boolToInt(value)));
}
- // At comptime, -% is disallowed on unsigned values.
- // So we need to jump through some hoops in that case.
- // This is a workaround for #7951
- if (@typeInfo(@TypeOf(.{value})).Struct.fields[0].is_comptime) {
- // Since it's comptime, we don't need this to generate nice code.
- // We can just do a branch here.
- return if (value) ~@as(MaskInt, 0) else 0;
- }
-
return -%@intCast(MaskInt, @boolToInt(value));
}