authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-06-22 01:19:06-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-06-22 01:19:06-04:00
log65997f816bd7aa48f585c61e4d966253d9947ec5
tree9d684e2a3bae616b1eb4841fb5dc8072cae738b2
parent726674b2bd0ac8159c961a944012b096d08e5615
parentbe51511d295269851ea4128f0fd3db49fe96a661
signaturelock-open Commit is signed but in an unrecognized format.

Merge remote-tracking branch 'origin/master' into copy-elision-3


3 files changed, 12 insertions(+), 3 deletions(-)

doc/langref.html.in+1-1
......@@ -3787,7 +3787,7 @@ test "fn reflection" {
37873787 However right now it is hard coded to be a {#syntax#}u16{#endsyntax#}. See <a href="https://github.com/ziglang/zig/issues/786">#768</a>.
37883788 </p>
37893789 <p>
3790 You can {#link|implicitly cast|Implicit Casts#} an error from a subset to its superset:
3790 You can {#link|implicitly cast|Implicit Casts#} an error from a subset to a superset:
37913791 </p>
37923792 {#code_begin|test#}
37933793const std = @import("std");
std/c/darwin.zig+1-1
......@@ -37,7 +37,7 @@ const mach_hdr = if (@sizeOf(usize) == 8) mach_header_64 else mach_header;
3737pub extern "c" var _mh_execute_header: mach_hdr = undefined;
3838comptime {
3939 if (std.os.darwin.is_the_target) {
40 @export("__mh_execute_header", _mh_execute_header, .Weak);
40 @export("_mh_execute_header", _mh_execute_header, .Weak);
4141 }
4242}
4343
std/math.zig+10-1
......@@ -482,7 +482,16 @@ fn testAbsInt() void {
482482 testing.expect((absInt(i32(10)) catch unreachable) == 10);
483483}
484484
485pub const absFloat = @import("fabs.zig").fabs;
485pub const absFloat = fabs;
486
487test "math.absFloat" {
488 testAbsFloat();
489 comptime testAbsFloat();
490}
491fn testAbsFloat() void {
492 testing.expect(absFloat(f32(-10.05)) == 10.05);
493 testing.expect(absFloat(f32(10.05)) == 10.05);
494}
486495
487496pub fn divTrunc(comptime T: type, numerator: T, denominator: T) !T {
488497 @setRuntimeSafety(false);