std.math: hard deprecate obsolete constants (soft deprecated in 0.10)

Followup to 5b8ac9821d.
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
This commit is contained in:
Eric Joldasov
2023-06-04 23:09:17 +06:00
parent eb4439f1e4
commit d04a262a3d
5 changed files with 343 additions and 255 deletions

View File

@@ -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();