diff options
| author | antlilja <liljaanton2001@gmail.com> | 2023-07-17 00:21:45 +0200 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-09-27 11:24:28 -0700 |
| commit | bcf4a1391331e52e4a06528530316970ded75c74 (patch) | |
| tree | 484d6472f552780d6482b8457e56b29f9a06379d /lib/std/meta.zig | |
| parent | 1c02e58fc06aa3e429f963e600e126611df3626e (diff) | |
| download | zig-bcf4a1391331e52e4a06528530316970ded75c74.tar.gz zig-bcf4a1391331e52e4a06528530316970ded75c74.zip | |
Remove `@fabs`, fabs and absCast/Int from std lib
Replaces occurences of @fabs absCast and absInt with new @abs builtin.
Also removes the std.math.fabs alias from math.zig.
Diffstat (limited to 'lib/std/meta.zig')
| -rw-r--r-- | lib/std/meta.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/meta.zig b/lib/std/meta.zig index c8ef19c017..d65d53f8f6 100644 --- a/lib/std/meta.zig +++ b/lib/std/meta.zig @@ -1104,6 +1104,6 @@ pub fn isError(error_union: anytype) bool { } test "isError" { - try std.testing.expect(isError(math.absInt(@as(i8, -128)))); - try std.testing.expect(!isError(math.absInt(@as(i8, -127)))); + try std.testing.expect(isError(math.divTrunc(u8, 5, 0))); + try std.testing.expect(!isError(math.divTrunc(u8, 5, 5))); } |
