diff --git a/doc/langref.html.in b/doc/langref.html.in index 5ddd572e514ff8899e0bf220516b863471a2573c..54223a9ce36b4c40a25d30bf538114d080c246e6 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -3787,7 +3787,7 @@ test "fn reflection" { However right now it is hard coded to be a {#syntax#}u16{#endsyntax#}. See #768.
- You can {#link|implicitly cast|Implicit Casts#} an error from a subset to its superset: + You can {#link|implicitly cast|Implicit Casts#} an error from a subset to a superset:
{#code_begin|test#} const std = @import("std"); diff --git a/std/c/darwin.zig b/std/c/darwin.zig index 14a5baff5cc4b2fc1833442786d0049402bba6ad..f2e8120a0e8725b11f1e36d237aaaa910ede718e 100644 --- a/std/c/darwin.zig +++ b/std/c/darwin.zig @@ -37,7 +37,7 @@ const mach_hdr = if (@sizeOf(usize) == 8) mach_header_64 else mach_header; pub extern "c" var _mh_execute_header: mach_hdr = undefined; comptime { if (std.os.darwin.is_the_target) { - @export("__mh_execute_header", _mh_execute_header, .Weak); + @export("_mh_execute_header", _mh_execute_header, .Weak); } } diff --git a/std/math.zig b/std/math.zig index 96f38aca9fab42f30b4859a4f567a88148b4ab02..ac06a07953b25d45a0b9ebb494eafc19855b1956 100644 --- a/std/math.zig +++ b/std/math.zig @@ -482,7 +482,16 @@ fn testAbsInt() void { testing.expect((absInt(i32(10)) catch unreachable) == 10); } -pub const absFloat = @import("fabs.zig").fabs; +pub const absFloat = fabs; + +test "math.absFloat" { + testAbsFloat(); + comptime testAbsFloat(); +} +fn testAbsFloat() void { + testing.expect(absFloat(f32(-10.05)) == 10.05); + testing.expect(absFloat(f32(10.05)) == 10.05); +} pub fn divTrunc(comptime T: type, numerator: T, denominator: T) !T { @setRuntimeSafety(false);