From 28821b5f31ec3a23d3a5def6ea0d242fdfede422 Mon Sep 17 00:00:00 2001 From: Jimmi HC Date: Wed, 4 Jul 2018 11:35:29 +0200 Subject: [PATCH] Fixed last commit compiler error --- std/mem.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/std/mem.zig b/std/mem.zig index bfd74669f2..b52d3e9f68 100644 --- a/std/mem.zig +++ b/std/mem.zig @@ -34,7 +34,7 @@ pub const Allocator = struct { /// Call `destroy` with the result pub fn create(self: *Allocator, init: var) Error!*@typeOf(init) { const T = @typeOf(init); - if (@sizeOf(T) == 0) return &T{}; + if (@sizeOf(T) == 0) return &(T{}); const slice = try self.alloc(T, 1); const ptr = &slice[0]; ptr.* = init;