From d04a262a3d7e68920dec2a6becc86bf79d81452c Mon Sep 17 00:00:00 2001 From: Eric Joldasov Date: Sun, 4 Jun 2023 23:09:17 +0600 Subject: std.math: hard deprecate obsolete constants (soft deprecated in 0.10) Followup to 5b8ac9821dd25c3e5282130b4d93d6c5b7debb08. Signed-off-by: Eric Joldasov --- test/behavior/pointers.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/behavior/pointers.zig') diff --git a/test/behavior/pointers.zig b/test/behavior/pointers.zig index 70bc6ad47e..d343c5dbc4 100644 --- a/test/behavior/pointers.zig +++ b/test/behavior/pointers.zig @@ -357,9 +357,9 @@ test "pointer sentinel with +inf" { const S = struct { fn doTheTest() !void { - const inf = std.math.inf_f32; - var ptr: [*:inf]const f32 = &[_:inf]f32{ 1.1, 2.2, 3.3, 4.4 }; - try expect(ptr[4] == inf); // TODO this should be comptime try expect, see #3731 + const inf_f32 = comptime std.math.inf(f32); + var ptr: [*:inf_f32]const f32 = &[_:inf_f32]f32{ 1.1, 2.2, 3.3, 4.4 }; + try expect(ptr[4] == inf_f32); // TODO this should be comptime try expect, see #3731 } }; try S.doTheTest(); -- cgit v1.2.3