diff --git a/doc/langref.html.in b/doc/langref.html.in index 5ddd572e51..54223a9ce3 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 14a5baff5c..f2e8120a0e 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 96f38aca9f..ac06a07953 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);