Commit 0c7397b49f

Jonathan Marler <johnnymarler@gmail.com>
2020-05-07 07:08:08
fix copy/paste error in AllocWithOptionaPayload
1 parent b336dda
Changed files (1)
lib
lib/std/mem.zig
@@ -124,9 +124,9 @@ pub const Allocator = struct {
 
     fn AllocWithOptionsPayload(comptime Elem: type, comptime alignment: ?u29, comptime sentinel: ?Elem) type {
         if (sentinel) |s| {
-            return [:s]align(alignment orelse @alignOf(T)) Elem;
+            return [:s]align(alignment orelse @alignOf(Elem)) Elem;
         } else {
-            return []align(alignment orelse @alignOf(T)) Elem;
+            return []align(alignment orelse @alignOf(Elem)) Elem;
         }
     }