From aa0daea5415dd2a20e4d7c2fd047b7bcee6c9ea4 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 7 Nov 2019 18:52:09 -0500 Subject: update more of the std lib to use `@as` --- lib/std/heap.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/std/heap.zig') diff --git a/lib/std/heap.zig b/lib/std/heap.zig index c9e9e3533d..24ab395734 100644 --- a/lib/std/heap.zig +++ b/lib/std/heap.zig @@ -893,10 +893,10 @@ fn testAllocatorLargeAlignment(allocator: *mem.Allocator) mem.Allocator.Error!vo if (mem.page_size << 2 > maxInt(usize)) return; const USizeShift = @IntType(false, std.math.log2(usize.bit_count)); - const large_align = u29(mem.page_size << 2); + const large_align = @as(u29, mem.page_size << 2); var align_mask: usize = undefined; - _ = @shlWithOverflow(usize, ~@as(usize, 0), USizeShift(@ctz(u29, large_align)), &align_mask); + _ = @shlWithOverflow(usize, ~@as(usize, 0), @as(USizeShift, @ctz(u29, large_align)), &align_mask); var slice = try allocator.alignedAlloc(u8, large_align, 500); testing.expect(@ptrToInt(slice.ptr) & align_mask == @ptrToInt(slice.ptr)); -- cgit v1.2.3